/* Только системные шрифты: CSP font-src 'self', внешние шрифты не подключаем. */
:root {
  --bg: #f1f4f6;
  --surface: #ffffff;
  --surface-2: #f6faf8;
  --sidebar: #0a1316;
  --sidebar-2: #101d21;
  --text: #0b1220;
  --muted: #56606b;
  --line: #d2d9e0;
  --line-soft: #e6ebf0;
  --accent: #1aa896;
  --accent-dark: #0f8f7e;
  --accent-soft: #e6f7f4;
  --green: #19a974;
  --red: #dc4c64;
  --blue: #3984e7;
  --violet: #8957e5;
  --radius: 18px;
  --shadow:
    0 1px 0 rgba(255, 255, 255, .55) inset,
    0 1px 2px rgba(15, 23, 42, .04),
    0 10px 28px rgba(15, 23, 42, .07);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .05);
  --hairline: 1px;
  --sidebar-width: 264px;
  --topbar-h: 76px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, "Liberation Mono", monospace;
}

/* Retina / Ultra HD: тонкие границы и чётче сглаживание. */
@media (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5) {
  :root { --hairline: 0.5px; }
}

/* Полностью тёмная тема панели (настройка «Оформление → Тёмная»). */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1214;
  --surface: #141c1f;
  --surface-2: #1a2327;
  --sidebar: #070c0e;
  --sidebar-2: #0e1619;
  --text: #e8eef0;
  --muted: #93a0a8;
  --line: #2a363b;
  --line-soft: #1e282c;
  --accent-soft: rgba(26, 168, 150, .16);
  --shadow:
    0 1px 0 rgba(255, 255, 255, .04) inset,
    0 1px 2px rgba(0, 0, 0, .28),
    0 14px 36px rgba(0, 0, 0, .42);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 22px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel__header,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .button--ghost,
html[data-theme="dark"] .page-help__panel,
html[data-theme="dark"] .page-help__btn,
html[data-theme="dark"] .user-menu__dropdown,
html[data-theme="dark"] .notify-menu,
html[data-theme="dark"] .notify-dropdown,
html[data-theme="dark"] .dropdown-panel,
html[data-theme="dark"] .modal__card,
html[data-theme="dark"] dialog.modal[open],
html[data-theme="dark"] .metric,
html[data-theme="dark"] .pl-tile,
html[data-theme="dark"] .pl-kpi,
html[data-theme="dark"] .rcm-card,
html[data-theme="dark"] .prod-card,
html[data-theme="dark"] .omd-card,
html[data-theme="dark"] .omd-filters,
html[data-theme="dark"] .schedules-mini-stats article,
html[data-theme="dark"] .schedules-compact,
html[data-theme="dark"] .empty-state--rich,
html[data-theme="dark"] .profile-side-panel,
html[data-theme="dark"] .machine-tile,
html[data-theme="dark"] .notify-toast,
html[data-theme="dark"] .settings-tabs,
html[data-theme="dark"] .permission-editor__block,
html[data-theme="dark"] .role-card,
html[data-theme="dark"] .table-tools,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .color-field,
html[data-theme="dark"] .settings-info-strip {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .page-help__btn:hover,
html[data-theme="dark"] .page-help__btn[aria-expanded="true"],
html[data-theme="dark"] .button--ghost:hover,
html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .settings-tabs button:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .settings-tabs button {
  color: var(--muted);
}

html[data-theme="dark"] .settings-tabs button.active {
  color: var(--text);
  background: var(--accent-soft);
}

html[data-theme="dark"] .settings-tabs button.active > span {
  color: var(--accent);
}

html[data-theme="dark"] .settings-tabs button small,
html[data-theme="dark"] .settings-tabs__label {
  color: var(--muted);
}

html[data-theme="dark"] .admin-content > .page-heading .button--ghost,
html[data-theme="dark"] .admin-content > .page-heading .button--secondary,
html[data-theme="dark"] .admin-content > .page-heading a.button,
html[data-theme="dark"] .mon-hero__actions .button--ghost,
html[data-theme="dark"] .mon-hero__actions .button--secondary,
html[data-theme="dark"] .mon-hero__link {
  color: var(--text) !important;
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .admin-content > .page-heading .button--ghost:hover,
html[data-theme="dark"] .admin-content > .page-heading .button--secondary:hover,
html[data-theme="dark"] .admin-content > .page-heading a.button:hover,
html[data-theme="dark"] .mon-hero__actions .button:hover,
html[data-theme="dark"] .mon-hero__actions .button--ghost:hover,
html[data-theme="dark"] .mon-hero__actions .button--secondary:hover,
html[data-theme="dark"] .mon-hero__link:hover {
  background: var(--surface-2) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  background: var(--surface);
  border-color: var(--accent);
}

html[data-theme="dark"] .form-grid code,
html[data-theme="dark"] code {
  color: #9ff0e0;
  background: var(--surface-2);
}

html[data-theme="dark"] table.table th,
html[data-theme="dark"] .incident-table thead th,
html[data-theme="dark"] thead th {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--line);
}

html[data-theme="dark"] table.table td,
html[data-theme="dark"] .incident-table td,
html[data-theme="dark"] tbody td {
  color: var(--text);
  border-color: var(--line-soft);
}

html[data-theme="dark"] table.table tr:hover td,
html[data-theme="dark"] .incident-table tr:hover td {
  background: rgba(255, 255, 255, .03);
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .panel__header p,
html[data-theme="dark"] .breadcrumbs span,
html[data-theme="dark"] .section-title p,
html[data-theme="dark"] .user-menu small {
  color: var(--muted);
}

html[data-theme="dark"] .breadcrumbs b,
html[data-theme="dark"] .user-menu b,
html[data-theme="dark"] .panel__header h2,
html[data-theme="dark"] .section-title h2,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
  color: var(--text);
}

html[data-theme="dark"] .alert--error {
  border-color: #5a3038;
  color: #f0a8b4;
  background: #2a161a;
}

html[data-theme="dark"] .alert--success {
  border-color: #2d5a45;
  color: #8fd9b5;
  background: #14241c;
}

html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .dash-home-list__row,
html[data-theme="dark"] .dash-home-card,
html[data-theme="dark"] .director-kpis article,
html[data-theme="dark"] .stat-grid article,
html[data-theme="dark"] .whats-new,
html[data-theme="dark"] .switch-list > label,
html[data-theme="dark"] .permission-row,
html[data-theme="dark"] .matrix-table th,
html[data-theme="dark"] .matrix-table td {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .topbar .live-pill,
html[data-theme="dark"] .system-time span {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}

html[data-theme="dark"] .avatar {
  color: #f5d08a;
  background: #3a2e14;
}

html[data-theme="dark"] .button--danger,
html[data-theme="dark"] .button.button--danger {
  background: #8f2f3f;
}

html[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #314046;
  border-radius: 8px;
}
html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: transparent;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  image-rendering: -webkit-optimize-contrast;
}
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 12% -8%, rgba(26, 168, 150, .07), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(57, 132, 231, .05), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(1100px 480px at 10% -10%, rgba(26, 168, 150, .1), transparent 55%),
    radial-gradient(800px 400px at 100% 0%, rgba(57, 132, 231, .07), transparent 50%),
    var(--bg);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 3vw, 38px); line-height: 1.15; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; font-size: 19px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.brand b { color: var(--accent); }
.brand--center { justify-content: center; font-size: 18px; }
.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-size: 19px;
  font-weight: 800;
}

/* Authentication */
.auth-page {
  background:
    linear-gradient(145deg, #0b1c22 0%, #12343a 46%, #eef3f6 46.1%, #f5f7f9 100%);
}
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.05fr) minmax(480px, .95fr); }
.auth-visual {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 42px clamp(38px, 6vw, 90px);
  color: #f8f8f9;
  background:
    linear-gradient(145deg, rgba(11, 28, 34, .98), rgba(18, 52, 58, .92)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.03) 80px),
    #0f2428;
  flex-direction: column;
  justify-content: space-between;
}
.auth-visual::before {
  position: absolute;
  right: -180px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(26, 168, 150, .25);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(26,168,150,.025), 0 0 0 160px rgba(26,168,150,.02);
  content: "";
}
.auth-visual::after {
  position: absolute;
  right: 10%;
  bottom: 18%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 28px 8px rgba(26,168,150,.35);
  content: "";
}
.auth-visual__content { position: relative; z-index: 1; max-width: 580px; }
.auth-visual__content h1 { margin: 0 0 24px; font-size: clamp(48px, 5.5vw, 76px); line-height: 1.02; letter-spacing: -.055em; }
.auth-visual__content p { max-width: 530px; margin: 0; color: #9da4ad; font-size: 17px; line-height: 1.8; }
.auth-visual__foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: 420px;
}
.auth-app-download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 12px 16px 12px 12px;
  border: 1px solid rgba(26, 168, 150, .32);
  border-radius: 14px;
  color: #f7f8fa;
  background:
    linear-gradient(135deg, rgba(26, 168, 150, .16), rgba(255, 255, 255, .03) 55%),
    rgba(10, 12, 15, .35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.auth-app-download:hover {
  border-color: rgba(26, 168, 150, .6);
  background:
    linear-gradient(135deg, rgba(26, 168, 150, .24), rgba(255, 255, 255, .05) 55%),
    rgba(10, 12, 15, .45);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}
.auth-app-download__icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(160deg, #2dd4bf, #1aa896);
  place-items: center;
  box-shadow: 0 4px 12px rgba(26, 168, 150, .35);
}
.auth-app-download__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.auth-app-download__text b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}
.auth-app-download__text small {
  color: #9aa3ad;
  font-size: 11px;
}
.auth-app-download--form {
  display: none;
  width: min(100%, 430px);
  margin-top: 18px;
  border-color: #e5e7eb;
  color: #2f353b;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}
.auth-app-download--form:hover {
  border-color: rgba(26, 168, 150, .45);
  color: #2f353b;
  background: #f0faf8;
}
.auth-app-download--form .auth-app-download__text small { color: #8a9199; }
.auth-status { display: flex; width: 100%; align-items: center; gap: 10px; color: #aab0b7; font-size: 12px; }
.auth-status time { margin-left: auto; color: #707780; font-variant-numeric: tabular-nums; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #24c48e; box-shadow: 0 0 0 4px rgba(36,196,142,.12); }
.auth-form-wrap {
  display: flex;
  padding: 40px;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: min(100%, 430px);
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: none;
}
.auth-card > div:first-of-type { margin-bottom: 32px; }
.auth-card h2 { margin: 0 0 8px; font-size: 29px; }
.auth-card label { display: block; margin-bottom: 19px; color: #4d5259; font-size: 12px; font-weight: 700; }
.auth-card label > span { display: block; margin-bottom: 8px; }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; top: 50%; left: 15px; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: #9aa0a8; stroke-width: 1.6; }
.input-icon input { width: 100%; height: 52px; padding: 0 84px 0 45px; border: 1px solid #dfe1e4; border-radius: 10px; outline: none; color: var(--text); background: #fafafa; transition: .2s; }
.input-icon input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(26,168,150,.1); }
.password-toggle { position: absolute; top: 50%; right: 12px; padding: 5px; border: 0; color: #8a9098; background: transparent; transform: translateY(-50%); cursor: pointer; font-size: 10px; font-weight: 700; }
.auth-footer { margin-top: 28px; color: #9a9da2; font-size: 10px; }
.install-card, .error-card {
  width: min(92%, 610px);
  margin: 7vh auto;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: none;
}
.error-card { text-align: center; }
.error-code { color: var(--accent); font-size: 72px; font-weight: 800; }

/* Install wizard */
.install-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #101318;
  font-family: var(--font-display);
}
.install-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(340px, .9fr) minmax(420px, 1.1fr); }
.install-visual {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 42px clamp(28px, 4vw, 64px);
  color: #f8f8f9;
  background:
    linear-gradient(145deg, rgba(14, 17, 20, .98), rgba(24, 28, 34, .92)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.03) 80px),
    #14181d;
  flex-direction: column;
  justify-content: space-between;
}
.install-visual::before {
  position: absolute;
  right: -140px;
  top: 18%;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(26, 168, 150, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(26,168,150,.03);
  content: "";
}
.install-visual__content { position: relative; z-index: 1; max-width: 420px; }
.install-visual__content h1 { margin: 0 0 16px; font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -.05em; }
.install-visual__content > p { margin: 0 0 34px; color: #9aa1aa; font-size: 15px; line-height: 1.7; }
.install-rail { display: flex; margin: 0; padding: 0; list-style: none; flex-direction: column; gap: 12px; }
.install-rail li { display: flex; align-items: center; gap: 12px; opacity: .45; transition: .25s ease; }
.install-rail li.is-active, .install-rail li.is-done { opacity: 1; }
.install-rail li > span {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  color: #d7dbe0;
  background: rgba(255,255,255,.04);
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}
.install-rail li.is-active > span {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  animation: installPulse 1.8s ease infinite;
}
.install-rail li.is-done > span { color: #dff7ec; background: rgba(36,196,142,.2); border-color: rgba(36,196,142,.45); }
.install-rail b { display: block; font-size: 13px; }
.install-rail small { color: #808790; font-size: 11px; }
.install-main {
  display: flex;
  padding: 36px clamp(20px, 4vw, 48px);
  background:
    radial-gradient(circle at top right, rgba(26,168,150,.08), transparent 28%),
    #f3f4f6;
  flex-direction: column;
  justify-content: center;
}
.install-form, .install-panel--done { width: min(100%, 520px); margin: 0 auto; }
.install-footer { margin-top: auto; padding-top: 28px; text-align: center; opacity: .55; }
.install-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 auto 16px;
  width: min(100%, 520px);
}
.install-dots span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #d8dee6;
  transition: background .3s ease, transform .3s ease;
}
.install-dots span.is-active {
  background: linear-gradient(90deg, var(--accent), #12b89f);
  transform: scaleY(1.35);
}
.install-dots span.is-done { background: #9ed9cc; }
.install-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .08);
}
.install-card .install-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.install-card .install-panel--done {
  padding: clamp(28px, 4vw, 36px);
  border: 1px solid #e4e6e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(20, 24, 30, .08);
}
.install-toast {
  width: min(100%, 520px);
  margin: 0 auto 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.install-toast--error {
  border: 1px solid #f0d0d6;
  color: #9b3044;
  background: #fff5f7;
}
.install-visual {
  background:
    radial-gradient(circle at 20% 0%, rgba(26, 168, 150, .18), transparent 42%),
    linear-gradient(155deg, #0c1014 0%, #151a22 48%, #101820 100%);
}
.install-visual__content h1 {
  font-size: clamp(38px, 4.8vw, 58px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.install-visual__content > p {
  max-width: 340px;
  margin-bottom: 36px;
  color: #8f98a3;
  line-height: 1.65;
}
.install-rail li.is-active { transform: translateX(4px); }
.install-rail li.is-active > span {
  background: linear-gradient(135deg, var(--accent), #0d9a88);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(26, 168, 150, .35);
  animation: none;
}
.install-main {
  background:
    radial-gradient(circle at 100% 0%, rgba(26, 168, 150, .1), transparent 32%),
    linear-gradient(180deg, #eef1f4 0%, #f7f8fa 100%);
}
.install-panel {
  display: flex;
  min-height: min(68vh, 480px);
  flex-direction: column;
}
.install-panel h2 { margin-bottom: 18px; font-size: clamp(24px, 3vw, 30px); }
.install-panel .form-grid { flex: 1; }
.install-actions { margin-top: auto; padding-top: 18px; }
.install-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.install-checks > div {
  min-height: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
}
.install-checks span { font-weight: 700; }
.install-db-status { white-space: normal; font-weight: 600; }
.install-steps-viewport { min-height: min(68vh, 480px); }
.install-password-row .button { min-width: 44px; padding: 0 12px; }
.install-steps-viewport {
  position: relative;
  overflow: hidden;
  min-height: min(72vh, 520px);
}
.install-db-host-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(26, 168, 150, .28);
  border-radius: 10px;
  color: #0f6b5c;
  background: rgba(26, 168, 150, .08);
  font-size: 12px;
  line-height: 1.5;
}
.install-db-host-hint code {
  font-size: 11px;
}
.install-password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.install-password-row .button {
  height: 44px;
  white-space: nowrap;
}
.install-panel[hidden] {
  display: none !important;
}
.install-panel[data-install-step] {
  animation: none;
}
.install-panel.is-entering {
  animation: installSlideIn .42s cubic-bezier(.22, 1, .36, 1) forwards;
}
.install-panel.is-leaving {
  animation: installSlideOut .26s ease forwards;
}
.install-panel .field-hint {
  display: block;
  margin-top: 6px;
  color: #8a919a;
  font-size: 11px;
  line-height: 1.45;
}
.install-panel select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d7dbe0;
  border-radius: 10px;
  color: #1f2430;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
}
.install-panel select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 168, 150, .14);
}
.install-step-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0f6b5c;
  background: rgba(26, 168, 150, .1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@keyframes installSlideIn {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes installSlideOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(-18px); }
}
.install-panel {
  padding: 34px;
  border: 1px solid #e4e6e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(20, 24, 30, .08);
}
.install-panel h2 { margin: 0 0 8px; color: #15181c; font-size: 28px; letter-spacing: -.03em; }
.install-panel > .muted { margin: 0 0 22px; color: #747b85; }
.install-panel .form-grid { margin: 0; }
.install-panel .form-grid label { color: #555c65; font-size: 11px; font-weight: 700; }
.install-panel .form-grid input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dfe2e5;
  border-radius: 9px;
  outline: none;
  color: #15181c;
  background: #fafbfc;
  font: inherit;
}
.install-panel .form-grid input:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,168,150,.1);
}
.install-alert { width: min(100%, 560px); margin: 0 auto 16px; }
.install-checks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.install-checks > div {
  display: flex;
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fafbfc;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.install-checks > div.ok { border-color: #cfe9dc; background: #f3fbf7; }
.install-checks > div.bad { border-color: #f0d0d6; background: #fff5f7; }
.install-checks b { font-size: 12px; }
.install-checks span { color: #7b828b; font-size: 11px; }
.install-actions { display: flex; margin-top: 8px; align-items: center; justify-content: space-between; gap: 12px; }
.install-db-test { display: flex; margin: 4px 0 18px; flex-direction: column; gap: 10px; }
.install-db-test .button { align-self: flex-start; min-height: 40px; }
.install-db-status {
  padding: 11px 13px;
  border: 1px solid #e3e5e8;
  border-radius: 9px;
  color: #555c65;
  background: #f7f8f9;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-wrap;
}
.install-db-status.is-ok { border-color: #bde7d7; color: #147953; background: #effbf6; }
.install-db-status.is-bad { border-color: #f2cfd5; color: #a9364a; background: #fff2f4; }
.install-actions .button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.install-progress-bar {
  height: 8px;
  margin: 8px 0 22px;
  overflow: hidden;
  border-radius: 99px;
  background: #eceff2;
}
.install-progress-bar > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #24c48e);
  transition: width .35s ease;
}
.install-progress-list { display: flex; margin: 0; padding: 0; list-style: none; flex-direction: column; gap: 10px; }
.install-progress-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a9199;
  font-size: 13px;
  font-weight: 600;
}
.install-progress-list li > span {
  width: 18px;
  height: 18px;
  border: 2px solid #d7dbe0;
  border-radius: 50%;
}
.install-progress-list li.is-active { color: #1f2430; }
.install-progress-list li.is-active > span {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(26,168,150,.12);
  animation: installPulse 1s ease infinite;
}
.install-progress-list li.is-done { color: #147953; }
.install-progress-list li.is-done > span {
  border-color: #24c48e;
  background: #24c48e;
  box-shadow: none;
  animation: none;
}
.install-panel--done { text-align: center; padding: 42px 34px; }
.install-success-mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #24c48e, #14885f);
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(20, 136, 95, .25);
  animation: installPop .45s ease;
}
.install-done-list {
  display: grid;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  gap: 8px;
  text-align: left;
}
.install-done-list li {
  padding: 11px 14px;
  border-radius: 10px;
  color: #2f6b52;
  background: #eefaf4;
  font-size: 12px;
  font-weight: 700;
}
@keyframes installFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes installPulse {
  50% { box-shadow: 0 0 0 7px rgba(26,168,150,.08); }
}
@keyframes installPop {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@media (max-width: 960px) {
  .install-shell { grid-template-columns: 1fr; }
  .install-visual { min-height: auto; padding: 28px 22px 24px; }
  .install-visual__content h1 { font-size: 34px; }
  .install-rail { display: none; }
  .install-main { padding: 22px 16px 36px; justify-content: flex-start; }
  .install-checks { grid-template-columns: 1fr; }
}

/* Controls */
.button {
  display: inline-flex;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #cfd4da;
  border-radius: 10px;
  color: #1f2933;
  background: #fff;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.button:hover {
  border-color: #b6bec7;
  background: #f8f9fb;
}
.button:active { transform: none; }
.button--primary {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset;
}
.button--primary:hover {
  border-color: #0c7a6c;
  background: #159987;
}
.button--secondary {
  border-color: #cfd4da;
  color: #1f2933;
  background: #fff;
}
.button--secondary:hover {
  background: #f3f5f7;
}
.button--ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}
.button--ghost:hover {
  border-color: var(--line);
  background: var(--surface-2);
}
.button--danger {
  border-color: #e8b4bd;
  color: #b42318;
  background: #fff5f6;
}
.button--danger:hover {
  border-color: #d9929e;
  background: #ffecef;
}
.button--wide { width: 100%; }
.button--xs {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}
.alert { position: relative; margin-bottom: 18px; padding: 13px 40px 13px 15px; border: 1px solid; border-radius: 9px; font-size: 12px; }
.alert--error { border-color: #f2cfd5; color: #a9364a; background: #fff2f4; }
.alert--success { border-color: #bde7d7; color: #147953; background: #effbf6; }
.alert button { position: absolute; top: 50%; right: 12px; border: 0; background: transparent; transform: translateY(-50%); cursor: pointer; }

/* Layout */
.admin-body { background: var(--bg); }
.admin-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  color: #eef0f2;
  background: var(--sidebar);
  flex-direction: column;
  transition: transform .25s;
}
.sidebar__workspace {
  display: flex;
  margin: 14px 14px 12px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  background: var(--sidebar-2);
  color: inherit;
  text-decoration: none;
  align-items: center;
  gap: 11px;
}
.workspace-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 800;
}
.sidebar__workspace > div,
.user-menu div { display: flex; min-width: 0; flex-direction: column; }
.sidebar__workspace b { font-size: 12px; color: #fff; }
.sidebar__workspace small, .user-menu small { color: #717983; font-size: 9px; }
.sidebar__nav { flex: 1; padding: 6px 12px; overflow-y: auto; scrollbar-width: none; }
.sidebar__nav::-webkit-scrollbar { display: none; }
.nav-caption { display: block; padding: 18px 12px 8px; color: #5f6670; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar__nav a { display: flex; min-height: 43px; margin: 3px 0; padding: 0 12px; border-radius: 8px; color: #9299a2; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; transition: .18s; }
.sidebar__nav a span { width: 21px; color: #6f7781; text-align: center; font-size: 16px; flex-shrink: 0; }
.sidebar__nav a .nav-link-text { flex: 1; min-width: 0; width: auto; text-align: left; color: inherit; font-size: inherit; }
.sidebar__nav a .nav-count {
  margin-left: auto;
  flex-shrink: 0;
  width: auto;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #d65b69;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  line-height: 1.4;
  text-align: center;
}
.sidebar__nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.sidebar__nav a.active { color: #fff; background: rgba(26,168,150,.09); }
.sidebar__nav a.active span { color: var(--accent); }
.sidebar__nav a.active .nav-count { background: var(--accent); }
.nav-group { margin: 3px 0; border-radius: 8px; }
.nav-group > summary { display: flex; min-height: 43px; padding: 0 12px; border-radius: 8px; color: #9299a2; align-items: center; gap: 12px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 600; transition: .18s; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: auto;
  flex-shrink: 0;
  border-right: 1.5px solid #5f6670;
  border-bottom: 1.5px solid #5f6670;
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.nav-group[open] > summary::after {
  transform: rotate(225deg);
  margin-top: 2px;
}
.nav-group > summary span { width: 21px; color: #6f7781; text-align: center; font-size: 16px; }
.nav-group > summary:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-group.is-open > summary,
.nav-group[open] > summary { color: #fff; background: rgba(26,168,150,.09); }
.nav-group.is-open > summary span,
.nav-group[open] > summary span { color: var(--accent); }
.nav-group__links { display: grid; padding: 2px 0 6px 33px; gap: 2px; }
.nav-group__links a { min-height: 36px; margin: 0; padding: 0 12px; color: #858d96; font-size: 11px; }
.nav-group__links a.active { color: #fff; background: rgba(26,168,150,.12); }
.sidebar__footer {
  display: flex;
  margin: 12px 14px 16px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-direction: column;
  gap: 10px;
}
.sidebar__footer-status {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar__footer-status div { display: flex; flex-direction: column; min-width: 0; }
.sidebar__footer-status b,
.sidebar__footer b { font-size: 10px; color: #e8eaed; }
.sidebar__footer-status small,
.sidebar__footer small { color: #69717c; font-size: 9px; }
.sidebar__app-download {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(232, 163, 23, .28);
  border-radius: 10px;
  color: #f3f4f6;
  background: linear-gradient(135deg, rgba(232, 163, 23, .14), rgba(255, 255, 255, .03));
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.sidebar__app-download:hover {
  border-color: rgba(232, 163, 23, .55);
  background: linear-gradient(135deg, rgba(232, 163, 23, .22), rgba(255, 255, 255, .05));
  color: #fff;
  transform: translateY(-1px);
}
.sidebar__app-download--disabled {
  opacity: .55;
  pointer-events: none;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}
.sidebar__app-download-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #0c1016;
  background: #e8a317;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}
.sidebar__app-download-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}
.sidebar__app-download-text b {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .01em;
}
.sidebar__app-download-text small {
  color: #8b949e;
  font-size: 9px;
}
.admin-main { display: flex; min-height: 100vh; margin-left: var(--sidebar-width); flex-direction: column; }
.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: var(--topbar-h);
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: space-between;
  box-shadow: none;
}
.breadcrumbs { display: flex; flex-direction: column; }
.breadcrumbs span { color: #949aa2; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.breadcrumbs b { font-size: 15px; }
.topbar__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  margin-right: auto;
}
.page-help { position: relative; flex: 0 0 auto; }
.page-help__btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #64748b;
  background: #f8fafc;
}
.page-help__btn[aria-expanded="true"],
.page-help__btn:hover {
  color: var(--accent-dark);
  border-color: #99f6e4;
  background: #f0fdfa;
}
.page-help__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 16px 16px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}
.page-help__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.page-help__head b {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.page-help__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.page-help__close:hover { background: #f1f5f9; color: #334155; }
.page-help__panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.25;
  color: #0f172a;
}
.page-help__block + .page-help__block { margin-top: 12px; }
.page-help__block small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.page-help__block p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}
.topbar__right { display: flex; align-items: center; gap: 16px; }
.system-time { display: flex; padding-right: 18px; border-right: 1px solid var(--line); color: #9298a0; flex-direction: column; align-items: flex-end; font-size: 9px; }
.system-time b { color: #32373d; font-size: 12px; font-variant-numeric: tabular-nums; }
.icon-button { position: relative; display: grid; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: #6d747d; background: var(--surface); place-items: center; cursor: pointer; }
.icon-button i { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.menu-button { display: none; }
.user-menu { display: flex; min-width: 205px; align-items: center; gap: 10px; }
.user-menu b { overflow: hidden; max-width: 135px; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-menu > a { margin-left: auto; color: #8b9199; }
.avatar { display: grid; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 9px; color: #8f5b00; background: #fff0cf; place-items: center; font-size: 10px; font-weight: 800; overflow: hidden; }
.avatar--photo { padding: 0; background: #e5e7eb; }
.avatar--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px 34px 50px; flex: 1; }
.page-heading {
  display: flex;
  margin: 0 0 26px;
  padding: 4px 0 2px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 28px;
}
.page-heading > div:first-child {
  min-width: 0;
  max-width: min(820px, 100%);
}
.page-heading .eyebrow {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.page-heading h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.035em;
}
.page-heading p {
  margin: 0;
  max-width: 62ch;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}
.page-heading .heading-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}
.page-heading > .button,
.page-heading > a.button {
  flex: 0 0 auto;
  margin-top: 4px;
}
.admin-content > .page-heading,
.admin-content > .panel,
.admin-content > section,
.admin-content > form,
.admin-content > .stat-grid,
.admin-content > .alert,
.admin-content > .whats-new {
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}

/* Dashboard */
.stat-grid { display: grid; margin-bottom: 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric { display: flex; min-height: 130px; padding: 21px; border: var(--hairline) solid var(--line); border-radius: var(--radius); background: var(--surface); align-items: flex-start; gap: 16px; box-shadow: var(--shadow-soft); }
.metric__icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 10px; place-items: center; font-size: 17px; }
.metric__icon.amber { color: #b87200; background: #fff4dc; }
.metric__icon.green { color: var(--green); background: #e9f9f3; }
.metric__icon.blue { color: var(--blue); background: #edf5ff; }
.metric__icon.violet { color: var(--violet); background: #f3efff; }
.metric div { display: flex; flex-direction: column; }
.metric small { color: #7c838d; font-size: 10px; font-weight: 700; }
.metric strong { margin: 3px 0; font-size: 25px; letter-spacing: -.04em; }
.metric em { color: #9ba1a8; font-size: 9px; font-style: normal; }
.dashboard-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.production-strip { display: grid; margin-bottom: 20px; padding: 16px 20px; border: 1px solid #242a31; border-radius: var(--radius); color: #fff; background: #171b20; grid-template-columns: 1.4fr repeat(3, 1fr); align-items: center; gap: 10px; }
.production-strip h2 { margin: 0; font-size: 14px; }
.production-strip .eyebrow { margin-bottom: 4px; }
.production-strip a { display: flex; min-height: 64px; padding: 10px 18px; border-left: 1px solid #30363e; flex-direction: column; justify-content: center; }
.production-strip a small { color: #848c96; font-size: 8px; text-transform: uppercase; }
.production-strip a strong { color: var(--accent); font-size: 20px; }
.production-strip a em { color: #7f8791; font-size: 8px; font-style: normal; }
.panel {
  --panel-gap: 16px;
  --panel-pad-x: 22px;
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

/* ???????????? ???????????? ?????????????? ????????????????/???????????? ???? ?????????? */
.admin-content .panel,
.admin-content .metric,
.admin-content .pl-tile,
.admin-content .pl-kpi,
.admin-content .rcm-card,
.admin-content .prod-card,
.admin-content .omd-card,
.admin-content .omd-filters,
.admin-content .schedules-mini-stats article,
.admin-content .schedules-compact,
.admin-content .home-machine-card.panel,
.admin-content .empty-state--rich,
.admin-content .profile-side-panel,
.admin-content .machine-tile,
.admin-content .notify-toast,
.tablet-pin__card,
.tablet-pin__job,
.auth-card,
.install-card,
.error-card {
  border: var(--hairline) solid var(--line);
  box-shadow: var(--shadow-soft);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Ultra HD: чёткие canvas-графики и SVG-иконки на retina. */
canvas {
  image-rendering: auto;
}
svg, .workspace-icon, .metric__icon, .brand-mark {
  shape-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
img, picture {
  image-rendering: auto;
  max-width: 100%;
}
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {
  .admin-content .panel,
  .admin-content .metric,
  .admin-content .pl-tile,
  .admin-content .pl-kpi,
  .admin-content .rcm-card,
  .admin-content .prod-card,
  .topbar,
  .sidebar {
    border-width: var(--hairline);
  }
  h1, h2, .metric strong, .dashboard-kpis strong, .mon-oee-v2__donut-center strong {
    letter-spacing: -.04em;
  }
}
.panel__header {
  position: relative;
  z-index: 2;
  display: flex;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  flex-shrink: 0;
}
.panel__header > div:first-child { min-width: 0; }
.panel__header h2 { margin: 0 0 3px; font-size: 15px; }
.panel__header p { margin: 0; color: #9298a0; font-size: 10px; }
.panel__header .heading-actions,
.panel__header .button,
.panel__header .icon-button { flex-shrink: 0; }
/* ??????????????????????????? ?????????????????????????? ?????????????????????????????????? ????????? ????????????????????? ???????????????????? */
.panel__header + .form-grid,
.panel__header + form,
.panel__header + .switch-list,
.panel__header + .settings-block,
.panel__header + .section-title,
.panel__header + .muted,
.panel__header + p,
.panel__header + .panel-note,
.panel__header + .maint-filter,
.panel__header + .maint-form,
.panel__header + .mon-extra-body,
.panel__header + .mon-oee,
.panel__header + .mon-chart-wrap,
.panel__header + .mon-feed,
.panel__header + .mon-board,
.panel__header + .mon-timeline-list,
.panel__header + .rc-next-actions,
.panel__header + .pin-issue-form,
.panel__header + .pin-machine-grid,
.panel__header + .pin-station-links,
.panel__header + .pin-howto__list,
.panel__header + .ops-machine-picker__grid,
.panel__header + .data-export-form,
.panel__header + .roles-matrix,
.panel__header + .director-kpis,
.panel__header + .social-people,
.panel__header + .social-search,
.panel__header + .profile-shift-list,
.panel__header + .shift-block,
.panel__header + .profile-team-list,
.panel__header + .profile-my-cal,
.panel__header + .sn-feed,
.panel__header + .activity-list,
.panel__header + .home-stats__chart-grid,
.panel__header + .home-machines__workshop,
.panel__header + .shop-crew-people,
.panel__header + .shop-crew-replace-form,
.panel__header + .shop-crew-alert__list,
.panel__header + .panel-body,
.panel__header + .panel__body {
  margin-top: 0;
  padding-top: var(--panel-gap);
}
.panel__header + .table-scroll,
.panel__header + .table-wrap,
.panel__header + table.data-table,
.panel__header + table.table,
.panel__header + .table-tools,
.panel__header + .form-actions,
.panel__header + .empty-state {
  margin-top: 0;
}
.panel__header + .form-grid,
.panel__header + form.form-grid,
.panel > .form-grid {
  padding-left: var(--panel-pad-x);
  padding-right: var(--panel-pad-x);
  padding-bottom: 8px;
}
.panel > .form-grid:first-child,
.panel > form.form-grid:first-child {
  padding: 18px var(--panel-pad-x) 10px;
}
.panel > .empty-state:first-child,
.panel > .empty-state.empty-state--rich:first-child {
  padding: 28px var(--panel-pad-x);
}
.panel > .section-title:first-child {
  padding: 22px var(--panel-pad-x) 0;
}
.panel > h2:first-child,
.panel > h3:first-child {
  margin: 0;
  padding: 18px var(--panel-pad-x) 0;
}
.panel-note,
.panel > .muted,
.panel > p.muted {
  margin: 0;
  padding: var(--panel-gap) var(--panel-pad-x) 8px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}
.panel-body,
.panel__body {
  padding: 0 var(--panel-pad-x) 18px;
}
.live-label { display: flex; color: #77808a; align-items: center; gap: 6px; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.live-label i, .green-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.activity-list { padding: 0 23px 12px; }
.activity-item { display: flex; min-height: 65px; border-bottom: 1px solid #eef0f2; align-items: center; gap: 12px; }
.activity-item:last-child { border: 0; }
.activity-icon { display: grid; width: 30px; height: 30px; border-radius: 8px; color: #8b929b; background: #f2f4f6; place-items: center; }
.activity-item div { flex: 1; }
.activity-item b { font-size: 11px; }
.activity-item p, .activity-item time { margin: 0; color: #9298a1; font-size: 9px; }
.health-score { display: flex; padding: 26px 25px 21px; align-items: center; gap: 18px; }
.health-ring { display: flex; width: 78px; height: 78px; border: 6px solid #dcf4eb; border-top-color: var(--green); border-radius: 50%; align-items: baseline; justify-content: center; flex-direction: row; padding-top: 17px; }
.health-ring strong { font-size: 21px; }
.health-ring span { color: #87909a; font-size: 9px; }
.health-score b { font-size: 12px; }
.health-score p { margin: 3px 0 0; color: #959ba3; font-size: 9px; }
.health-list { margin: 0 22px 20px; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.health-list li { display: flex; padding: 12px 2px; border-bottom: 1px solid #eef0f2; align-items: center; justify-content: space-between; font-size: 10px; }
.health-list li span { display: flex; color: #666e77; align-items: center; gap: 8px; }
.health-list li b { color: var(--green); font-size: 9px; }
.empty-state { padding: 40px; color: var(--muted); text-align: center; }

.dashboard-kpis {
    display: grid;
    margin-bottom: 20px;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}
.dashboard-kpis a, .dashboard-kpis div {
    display: flex;
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dashboard-kpis a:hover {
    border-color: #d7dde4;
    box-shadow: 0 4px 14px rgba(20, 24, 30, .05);
}
.dashboard-kpis small {
    color: #8a9199;
    font-size: 8px;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.dashboard-kpis strong { font-size: 18px; letter-spacing: -.03em; }

.dash-live-board {
  margin-bottom: 16px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff 0%, #f8fafc 55%, #f0faf8 100%);
  box-shadow: 0 10px 30px rgba(20, 24, 30, .06);
}
.dash-live-board__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.dash-live-board__hint { color: #8b929b; font-size: 10px; }
.dash-live-clock {
  margin-left: auto;
  color: #4b5563;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.dash-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #ecfdf5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dash-live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .45);
  animation: dashLivePulse 1.8s ease-out infinite;
}
.dash-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.dash-live-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  border: 1px solid #eef0f2;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.dash-live-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: dashShine 4.5s ease-in-out infinite;
  pointer-events: none;
}
.dash-live-card:hover {
  transform: translateY(-2px);
  border-color: #e6e9ee;
  box-shadow: 0 12px 24px rgba(20, 24, 30, .08);
}
.dash-live-card.is-hot {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
}
.dash-live-card.is-hot .dash-live-card__icon {
  color: #dc2626;
  background: #fee2e2;
  animation: monPulse 1.4s ease-out infinite;
}
.dash-live-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  place-items: center;
  font-size: 17px;
}
.dash-live-card--green .dash-live-card__icon { color: var(--green); background: #e9f9f3; }
.dash-live-card--blue .dash-live-card__icon { color: var(--blue); background: #edf5ff; }
.dash-live-card--amber .dash-live-card__icon { color: #b87200; background: #fff4dc; }
.dash-live-card--violet .dash-live-card__icon { color: var(--violet); background: #f3efff; }
.dash-live-card--alert .dash-live-card__icon { color: var(--blue); background: #edf5ff; }
.dash-live-card__body { min-width: 0; }
.dash-live-card__body small {
  display: block;
  color: #8b929b;
  font-size: 9px;
  letter-spacing: .02em;
}
.dash-live-card__body strong {
  display: block;
  margin-top: 2px;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -.04em;
  transition: color .2s ease;
}
.dash-live-card__body strong span { font-size: 16px; }
.dash-live-card__body em {
  display: block;
  margin-top: 4px;
  color: #9aa0a7;
  font-size: 9px;
  font-style: normal;
  line-height: 1.35;
}

/* Personal home (role-based) */
.dash-home-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.dash-home-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 110px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .15s ease, transform .15s ease;
}
a.dash-home-card:hover {
  border-color: #cfd6de;
  transform: translateY(-1px);
}
.dash-home-card small {
  color: #8b929b;
  font-size: 11px;
  font-weight: 600;
}
.dash-home-card strong {
  font-size: 28px;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.dash-home-card em {
  margin-top: auto;
  color: #9aa0a7;
  font-size: 11px;
  font-style: normal;
}
.dash-home-card--green strong { color: #178a5a; }
.dash-home-card--blue strong { color: #2563eb; }
.dash-home-card--amber strong { color: #b87200; }
.dash-home-card--violet strong { color: #7c3aed; }
.dash-home-card--alert strong { color: #dc2626; }
.dash-home-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.dash-home-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 12px 12px;
}
.dash-home-list__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid #eef1f4;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.dash-home-list__row:last-child { border-bottom: 0; }
.dash-home-list__row > div {
  min-width: 0;
  flex: 1 1 auto;
}
.dash-home-list__row b {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.dash-home-list__row small {
  display: block;
  margin-top: 2px;
  color: #8b929b;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.dash-home-list__count {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f5f7;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.dash-home-list__row--warning .dash-home-list__count { background: #fff7e8; color: #b87200; }
.dash-home-list__row--critical .dash-home-list__count { background: #fdecec; color: #dc2626; }
.dash-home-next {
  margin-bottom: 16px;
}
@media (max-width: 980px) {
  .dash-home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dash-home-cards { grid-template-columns: 1fr; }
  .dash-home-lists { grid-template-columns: 1fr; }
  .dash-home-list { padding: 2px 8px 10px; }
  .dash-home-list__row { padding: 12px 6px; gap: 10px; }
  .dash-home-card { min-height: 96px; padding: 14px 14px; }
  .panel__header { padding: 14px 14px; align-items: flex-start; }
}
.dash-live-card--ring { padding-right: 10px; }
.dash-live-ring {
  --pct: 0;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), #eef0f2 0);
  display: grid;
  place-items: center;
  transition: background .6s ease;
}
.dash-live-ring span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #4b5563;
}
.dash-kpis-live strong.is-bump,
[data-dash-value].is-bump { color: var(--accent-dark); animation: dashBump .55s ease-out; }
@keyframes dashLivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
@keyframes dashShine {
  0%, 78%, 100% { transform: translateX(-120%); }
  40% { transform: translateX(120%); }
}
@keyframes dashBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.dashboard-grid--wide { grid-template-columns: 1.35fr 1fr; align-items: start; }
.dashboard-side { display: grid; gap: 16px; }
.dash-machine-legend {
    display: flex;
    padding: 10px 23px 0;
    flex-wrap: wrap;
    gap: 14px;
    color: #7d848d;
    font-size: 9px;
    font-weight: 700;
}
.dash-machine-legend span { display: inline-flex; align-items: center; gap: 6px; }
.status-dot--free { background: #24c48e; box-shadow: 0 0 0 4px rgba(36, 196, 142, .12); }
.status-dot--setup { background: var(--accent); box-shadow: 0 0 0 4px rgba(26, 168, 150, .16); }
.status-dot--working { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .14); }
.status-dot--busy { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.status-dot--off { background: #9aa1aa; box-shadow: 0 0 0 4px rgba(154, 161, 170, .14); }
.dash-machine-list { padding: 8px 14px 14px; }
.dash-machine-row {
    display: grid;
    min-height: 62px;
    padding: 10px 8px;
    border-bottom: 1px solid #eef0f2;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 12px;
}
.dash-machine-row:last-child { border-bottom: 0; }
.dash-machine-row .entity-icon {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #6f7781;
    background: #f2f4f6;
    place-items: center;
    font-size: 14px;
}
.dash-machine-row b { display: block; font-size: 12px; }
.dash-machine-row small { display: block; color: #8b929b; font-size: 9px; }
.dash-machine-row em { display: block; margin-top: 2px; color: #a66a00; font-size: 9px; font-style: normal; }
.machine-state--free { color: #176848; background: #e5f7ee; }
.machine-state--busy { color: #9f1239; background: #ffe4e6; }
.machine-state--off { color: #6d747d; background: #eef0f2; }
.dash-incident-list { padding: 8px 14px 14px; }
.dash-incident-row {
    display: grid;
    min-height: 58px;
    padding: 10px 8px;
    border-bottom: 1px solid #eef0f2;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.dash-incident-row:last-child { border-bottom: 0; }
.dash-incident-row:hover { background: #fafbfc; border-radius: 8px; }
.dash-incident-row b { display: block; font-size: 11px; }
.dash-incident-row small { display: block; color: #8b929b; font-size: 9px; }
.activity-list--compact .activity-item { min-height: 54px; }

/* Shift RC planning board */
.shift-rc-date-nav { display: flex; align-items: center; gap: 8px; }
.shift-rc-date-form input[type="date"] {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}
.shift-rc-hero {
    display: grid;
    margin-bottom: 16px;
    padding: 22px 24px;
    border: 1px solid #242a31;
    border-radius: var(--radius);
    color: #fff;
    background:
        linear-gradient(125deg, rgba(17, 20, 24, .96), rgba(28, 33, 40, .92)),
        repeating-linear-gradient(90deg, transparent 0 54px, rgba(255,255,255,.03) 55px);
    grid-template-columns: 1.2fr 2fr;
    gap: 18px;
    align-items: center;
}
.shift-rc-hero__main .eyebrow { color: var(--accent); }
.shift-rc-hero__main strong {
    display: block;
    margin: 2px 0 6px;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -.04em;
}
.shift-rc-hero__main p { margin: 0; color: #9aa1aa; font-size: 12px; }
.shift-rc-hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 8px;
}
.shift-rc-hero__stats article {
    min-height: 74px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
}
.shift-rc-hero__stats small {
    display: block;
    color: #8b929b;
    font-size: 8px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.shift-rc-hero__stats b { font-size: 22px; letter-spacing: -.03em; }
.shift-rc-hero__stats .is-free b { color: #7d8793; }
.shift-rc-hero__stats .is-planned b { color: #f0b429; }
.shift-rc-hero__stats .is-progress b { color: #6aa8ff; }
.shift-rc-hero__stats .is-done b { color: #3dd68c; }
.shift-rc-hero__stats .is-incident b { color: #ff7b8a; }
.shift-rc-filters {
    display: flex;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.shift-rc-filters a {
    display: inline-flex;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #6d747d;
    background: #fff;
    align-items: center;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
}
.shift-rc-filters a.is-active { color: var(--accent-dark); background: #fff4dc; border-color: #f0d39a; }
.shift-rc-filters a.area { color: #1f4f8a; }
.shift-rc-filters a.area.is-active { color: #1f4f8a; background: #e7f1ff; border-color: #c5daf5; }
.shift-rc-legend {
    display: flex;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 14px;
    color: #7d848d;
    font-size: 10px;
    font-weight: 700;
}
.shift-rc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9aa1aa;
    box-shadow: 0 0 0 4px rgba(154, 161, 170, .12);
}
.rc-dot--free { background: #9aa1aa; }
.rc-dot--planned { background: #f0b429; box-shadow: 0 0 0 4px rgba(240, 180, 41, .14); }
.rc-dot--progress { background: #3984e7; box-shadow: 0 0 0 4px rgba(57, 132, 231, .14); }
.rc-dot--done { background: #19a974; box-shadow: 0 0 0 4px rgba(25, 169, 116, .14); }
.rc-dot--incident { background: #dc4c64; box-shadow: 0 0 0 4px rgba(220, 76, 100, .14); }
.shift-rc-toolbar {
    display: flex;
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.shift-rc-toolbar.sticky {
    position: sticky;
    top: calc(var(--topbar-h) + 8px);
    z-index: 15;
    box-shadow: 0 10px 28px rgba(20, 24, 30, .08);
}
.shift-rc-toolbar p { margin: 0; color: #8a9199; font-size: 11px; }
.shift-rc-group { margin-bottom: 22px; }
.shift-rc-group__head {
    display: flex;
    margin-bottom: 12px;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}
.shift-rc-group__head h2 { margin: 0; font-size: 18px; }
.shift-rc-group__head b { color: #8a9199; font-size: 11px; }
.shift-rc-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.shift-rc-hero--compact {
    display: flex;
    padding: 14px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    grid-template-columns: unset;
}
.shift-rc-hero--compact strong { font-size: 22px; letter-spacing: -.03em; }
.shift-rc-hero--compact small { display: block; margin-top: 2px; color: #9aa1aa; font-size: 11px; }
.shift-rc-hero--compact .shift-rc-hero__stats { min-width: 420px; }
.rc-machine {
    display: block;
    padding: 0;
    border: 1px solid var(--line);
    border-left: 4px solid #b0b7c0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(20, 24, 30, .035);
}
.rc-machine--planned { border-left-color: #f0b429; }
.rc-machine--progress { border-left-color: #3984e7; }
.rc-machine--done { border-left-color: #19a974; }
.rc-machine--incident { border-left-color: #dc4c64; }
.rc-machine__body { padding: 10px 12px 12px; }
.rc-machine__top {
    display: grid;
    margin-bottom: 8px;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
}
.rc-ring { width: 56px; height: 56px; position: relative; }
.rc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rc-ring__track, .rc-ring__value { fill: none; stroke-width: 3; }
.rc-ring__track { stroke: #eef0f2; }
.rc-ring__value { stroke: #b0b7c0; stroke-linecap: round; }
.rc-machine--planned .rc-ring__value { stroke: #f0b429; }
.rc-machine--progress .rc-ring__value { stroke: #3984e7; }
.rc-machine--done .rc-ring__value { stroke: #19a974; }
.rc-machine--incident .rc-ring__value { stroke: #dc4c64; }
.rc-ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rc-ring__label em { color: #8b929b; font-size: 7px; font-style: normal; font-weight: 800; }
.rc-ring__label strong { font-size: 15px; line-height: 1; letter-spacing: -.04em; }
.rc-machine__meta h3 { margin: 2px 0; font-size: 14px; }
.rc-machine__meta small { color: #8b929b; font-size: 10px; }
.rc-status {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}
.rc-status--free { color: #5f6670; background: #eef0f2; }
.rc-status--idle { color: #475569; background: #e2e8f0; } /* ?????????????? */
.rc-status--setup,
.rc-status--planned { color: #8a4b00; background: #ffe8bf; } /* ?????????????? */
.rc-status--progress { color: var(--accent-dark); background: #d1fae5; } /* ?? ???????????? */
.rc-status--done { color: #176848; background: #e5f7ee; }
.rc-status--incident { color: #8a1f32; background: #fde8ec; }
.rc-status--overdue { color: #9a3412; background: #ffedd5; }
.rc-status--history {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.rc-machine__kpi { display: grid; grid-auto-flow: column; gap: 14px; text-align: right; }
.rc-machine__kpi span { display: block; color: #8b929b; font-size: 8px; text-transform: uppercase; }
.rc-machine__kpi b { font-size: 15px; }
.rc-machine__lines { display: grid; gap: 8px; }
.rc-line {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.rc-line__layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 200px;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    background: #fafbfc;
}
.rc-pos, .rc-data, .rc-timeline {
    min-width: 0;
}
.rc-pos {
    display: grid;
    gap: 6px;
    padding-right: 8px;
    border-right: 1px solid #e8eaed;
}
.rc-pos__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.rc-pos__head b { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #7d848d; }
.rc-line__actions { display: flex; gap: 2px; }
.rc-line__actions .button { min-width: 26px; min-height: 26px; padding: 0; }
.rc-pos label, .rc-data label, .rc-data__row > div, .rc-note {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.rc-pos span, .rc-data span, .rc-note span {
    color: #8a9199;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.rc-pos select, .rc-data select, .rc-data input, .rc-note input {
    width: 100%;
    min-height: 32px;
    padding: 2px 8px;
    border: 1px solid #dfe3e8;
    border-radius: 7px;
    background: #fff;
    font-size: 11px;
}
.rc-pos__meta { display: grid; gap: 4px; }
.rc-chip {
    display: inline-flex;
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    background: #eef0f2;
    color: #5f6670;
}
.rc-chip--pending { color: #8a4b00; background: #ffe8bf; }
.rc-chip--in_progress { color: #1f4f8a; background: #e7f1ff; }
.rc-chip--done { color: #176848; background: #e5f7ee; }
.rc-pos__meta small { color: #8a9199; font-size: 10px; }
.rc-data { display: grid; gap: 6px; }
.rc-data__row {
    display: grid;
    grid-template-columns: 70px 1.2fr 70px 90px;
    gap: 6px;
    align-items: end;
}
.rc-data__row--people {
    grid-template-columns: repeat(var(--ops, 2), minmax(120px, 1fr)) 70px;
}
.rc-ops {
    display: grid;
    gap: 6px;
    margin: 0 12px 8px;
    padding: 8px 10px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fafbfc;
}
.rc-ops__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.rc-ops__label {
    color: #8a9199;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.rc-ops__chips {
    display: grid;
    grid-template-columns: repeat(var(--ops, 1), minmax(140px, 1fr));
    gap: 8px;
}
.rc-ops__chip {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fff;
}
.rc-ops__chip.is-on { border-color: #c5daf5; background: #f3f8ff; }
.rc-ops__chip span { color: #8a9199; font-size: 10px; text-transform: uppercase; }
.rc-ops__chip b { font-size: 13px; }
.rc-ops__chip small { color: #8a9199; font-size: 11px; }
.rc-ops-modal__hint {
    grid-column: 1 / -1;
    margin: 0;
    color: #5f6770;
    font-size: 13px;
}
.rc-ops-modal__history span {
    display: block;
    margin-bottom: 6px;
    color: #8a9199;
    font-size: 11px;
    text-transform: uppercase;
}
.rc-ops-modal__history ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}
.rc-ops-modal__history li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f8fa;
    font-size: 12px;
}
.planned-list { display: grid; gap: 12px; }

.pl-page { display: grid; gap: 16px; }

/* ---- ??????????????????????????: ?????????????? ?????????????? ---- */
.pl-dash {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.pl-dash__stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}
.pl-dash svg {
    display: block;
    flex-shrink: 0;
}
.pl-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.pl-mini:hover {
    border-color: rgba(15, 23, 42, .14);
    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}
.pl-mini__ic {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--pl-mini-bg, #f1f5f9);
    color: var(--pl-mini-color, #475569);
}
.pl-mini__ic svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px;
    max-height: 16px;
}
.pl-mini__tx {
    min-width: 0;
    display: grid;
    gap: 0;
    line-height: 1.2;
}
.pl-mini__tx b {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-mini__tx span {
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.pl-mini__tx small {
    font-size: 9px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-mini--match { --pl-mini-bg: #ecfdf5; --pl-mini-color: #059669; }
.pl-mini--qty { --pl-mini-bg: #eff6ff; --pl-mini-color: #0284c7; }
.pl-mini--items { --pl-mini-bg: #f8fafc; --pl-mini-color: #475569; }
.pl-mini--work { --pl-mini-bg: #eff6ff; --pl-mini-color: #2563eb; }
.pl-mini--live { --pl-mini-bg: #ecfeff; --pl-mini-color: #0891b2; }
.pl-mini--wait { --pl-mini-bg: #fffbeb; --pl-mini-color: #d97706; }
.pl-mini--time { --pl-mini-bg: #f5f3ff; --pl-mini-color: #7c3aed; }
.pl-mini--plan { --pl-mini-bg: #f1f5f9; --pl-mini-color: #64748b; }
.pl-mini--qc { --pl-mini-bg: #fdf2f8; --pl-mini-color: #db2777; }
.pl-mini--metal-len { --pl-mini-bg: #ecfeff; --pl-mini-color: #0e7490; }
.pl-mini--metal-kg { --pl-mini-bg: #fff7ed; --pl-mini-color: #c2410c; }
.pl-mini--warn { --pl-mini-bg: #f8fafc; --pl-mini-color: #94a3b8; }
.pl-mini--warn.is-alert {
    border-color: #fecaca;
    background: #fef2f2;
    --pl-mini-bg: #fee2e2;
    --pl-mini-color: #dc2626;
}
.pl-mini--warn.is-alert .pl-mini__tx b { color: #b91c1c; }

/* legacy large cards ??? ???? ???????????????????????? */
.pl-dash-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 4px;
    min-height: 148px;
    padding: 16px 16px 14px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .9) inset,
        0 12px 28px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.pl-dash-card::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -20px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--pl-dash-glow, rgba(15, 118, 110, .14)) 0%, transparent 70%);
    pointer-events: none;
}
.pl-dash-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .95) inset,
        0 18px 36px rgba(15, 23, 42, .09);
}
.pl-dash-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.pl-dash-card__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--pl-dash-icon-bg, #ecfdf5);
    color: var(--pl-dash-icon-color, #0f766e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}
.pl-dash-card__icon svg {
    width: 22px;
    height: 22px;
}
.pl-dash-card__tag {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .04);
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pl-dash-card__value {
    margin-top: 4px;
    font-size: 32px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.04em;
    color: #0f172a;
}
.pl-dash-card__value em {
    margin-left: 2px;
    font-size: .55em;
    font-style: normal;
    font-weight: 700;
    color: #64748b;
}
.pl-dash-card__value--sm {
    font-size: 24px;
}
.pl-dash-card__label {
    color: #334155;
    font-size: 13px;
    font-weight: 650;
}
.pl-dash-card__meta {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.35;
}
.pl-dash-card__bar {
    margin-top: 8px;
    height: 6px;
    border-radius: 999px;
    background: #e8edf3;
    overflow: hidden;
}
.pl-dash-card__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #19a974, #34d399);
}
.pl-dash-card--match {
    --pl-dash-glow: rgba(16, 185, 129, .18);
    --pl-dash-icon-bg: #ecfdf5;
    --pl-dash-icon-color: #059669;
    background: linear-gradient(180deg, #ffffff 0%, #f4fcf8 100%);
}
.pl-dash-card--qty {
    --pl-dash-glow: rgba(14, 165, 233, .18);
    --pl-dash-icon-bg: #eff6ff;
    --pl-dash-icon-color: #0284c7;
    background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
}
.pl-dash-card--work {
    --pl-dash-glow: rgba(59, 130, 246, .18);
    --pl-dash-icon-bg: #eff6ff;
    --pl-dash-icon-color: #2563eb;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
}
.pl-dash-card--time {
    --pl-dash-glow: rgba(139, 92, 246, .16);
    --pl-dash-icon-bg: #f5f3ff;
    --pl-dash-icon-color: #7c3aed;
    background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
}

.pl-dash-metal {
    display: grid;
    gap: 14px;
    width: 100%;
    padding: 16px 18px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .18);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(45, 212, 191, .16), transparent 52%),
        radial-gradient(90% 70% at 100% 0%, rgba(56, 189, 248, .08), transparent 48%),
        linear-gradient(165deg, #0b1220 0%, #111827 46%, #0f172a 100%);
    color: #fff;
    box-shadow:
        0 18px 40px rgba(2, 6, 23, .22),
        inset 0 1px 0 rgba(255, 255, 255, .05);
    overflow: hidden;
}
.pl-dash-metal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.pl-dash-metal__title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.pl-dash-metal__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(45, 212, 191, .22), rgba(45, 212, 191, .08));
    border: 1px solid rgba(94, 234, 212, .22);
    color: #5eead4;
    box-shadow: 0 8px 18px rgba(20, 184, 166, .12);
}
.pl-dash-metal__icon svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
}
.pl-dash-metal__title strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
}
.pl-dash-metal__title small {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
    line-height: 1.45;
}
.pl-dash-metal__totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pl-dash-metal__chip {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(8px);
    transition: opacity .25s ease, transform .25s ease;
}
.pl-dash-metal__chip.is-hidden {
    display: none;
}
.pl-dash-metal__chip em {
    color: rgba(255, 255, 255, .55);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pl-dash-metal__chip b {
    font-size: 15px;
    font-weight: 800;
    color: #99f6e4;
    transition: transform .28s ease, opacity .28s ease;
}
.pl-dash-metal__chip--kg b {
    color: #fde68a;
}
.pl-dash-metal__nav {
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(2, 6, 23, .34);
}
.pl-dash-metal__nav-scroll {
    position: relative;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 5px;
}
.pl-dash-metal__nav-scroll::-webkit-scrollbar {
    display: none;
}
.pl-dash-metal__glider {
    position: absolute;
    top: 5px;
    left: 5px;
    height: calc(100% - 10px);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(45, 212, 191, .34), rgba(20, 184, 166, .16));
    border: 1px solid rgba(94, 234, 212, .34);
    box-shadow:
        0 10px 24px rgba(20, 184, 166, .18),
        inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .38s cubic-bezier(.22, 1, .36, 1), width .38s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
    z-index: 0;
}
.pl-dash-metal__tab {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    min-width: 148px;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, .72);
    text-align: left;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}
.pl-dash-metal__tab:hover {
    color: #fff;
}
.pl-dash-metal__tab.is-active {
    color: #fff;
}
.pl-dash-metal__tab-date {
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -.01em;
}
.pl-dash-metal__tab-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, .48);
    font-weight: 600;
}
.pl-dash-metal__tab.is-active .pl-dash-metal__tab-meta {
    color: rgba(255, 255, 255, .72);
}
.pl-dash-metal__tab--summary .pl-dash-metal__tab-date {
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 12px;
}
.pl-dash-metal__stage {
    display: grid;
    min-height: 96px;
}
.pl-dash-metal__panel {
    grid-area: 1 / 1;
    display: grid;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.985);
    pointer-events: none;
    transition:
        opacity .32s cubic-bezier(.22, 1, .36, 1),
        transform .32s cubic-bezier(.22, 1, .36, 1),
        visibility .32s;
}
.pl-dash-metal__panel.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}
.pl-dash-metal__panel.is-entering {
    animation: plMetalPanelIn .34s cubic-bezier(.22, 1, .36, 1);
}
.pl-dash-metal__panel.is-leaving {
    animation: plMetalPanelOut .28s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes plMetalPanelIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: none; }
}
@keyframes plMetalPanelOut {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(-8px) scale(.99); }
}
.pl-dash-metal__panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
}
.pl-dash-metal__panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.pl-dash-metal__panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(45, 212, 191, .14);
    border: 1px solid rgba(94, 234, 212, .24);
    color: #99f6e4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.pl-dash-metal__panel-title strong {
    font-size: 14px;
    font-weight: 750;
}
.pl-dash-metal__panel-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
    font-weight: 650;
}
.pl-dash-metal__panel-stats .is-len {
    color: #99f6e4;
}
.pl-dash-metal__panel-stats .is-kg {
    color: #fde68a;
}
.pl-dash-metal__overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.pl-dash-metal__overview-card {
    display: grid;
    gap: 6px;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition:
        transform .24s cubic-bezier(.22, 1, .36, 1),
        border-color .24s ease,
        box-shadow .24s ease,
        background .24s ease;
    animation: plMetalItemIn .42s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--metal-i, 0) * 55ms);
}
.pl-dash-metal__overview-card:hover {
    transform: translateY(-3px);
    border-color: rgba(94, 234, 212, .34);
    box-shadow: 0 14px 28px rgba(2, 6, 23, .28);
    background:
        linear-gradient(180deg, rgba(45, 212, 191, .12), rgba(255, 255, 255, .04));
}
.pl-dash-metal__overview-date {
    font-size: 15px;
    font-weight: 800;
}
.pl-dash-metal__overview-qty {
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -.02em;
    color: #99f6e4;
}
.pl-dash-metal__overview-meta {
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
    line-height: 1.45;
}
.pl-dash-metal__overview-action {
    margin-top: 2px;
    color: rgba(255, 255, 255, .42);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.pl-dash-metal__overview-card:hover .pl-dash-metal__overview-action {
    color: #99f6e4;
}
.pl-dash-metal__empty {
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    align-self: center;
}
.pl-dash-metal__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    width: 100%;
}
.pl-dash-metal__item-wrap {
    animation: plMetalItemIn .42s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--metal-i, 0) * 45ms);
}
@keyframes plMetalItemIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.pl-dash-metal__item {
    display: grid;
    gap: 7px;
    height: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pl-dash-metal__item:hover {
    border-color: rgba(94, 234, 212, .22);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(2, 6, 23, .18);
}
.pl-dash-metal__item.is-unknown {
    opacity: .72;
}
.pl-dash-metal__item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.pl-dash-metal__item-head b {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-dash-metal__item-head span {
    color: rgba(255, 255, 255, .45);
    font-size: 10px;
    white-space: nowrap;
}
.pl-dash-metal__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.pl-dash-metal__metrics span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.pl-dash-metal__metrics em {
    color: rgba(255, 255, 255, .45);
    font-size: 10px;
    font-style: normal;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.pl-dash-metal__metrics b {
    font-size: 12px;
    font-weight: 750;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-dash-metal__track {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}
.pl-dash-metal__track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #5eead4);
}
.pl-dash-metal__item.is-unknown .pl-dash-metal__track i {
    background: linear-gradient(90deg, #64748b, #94a3b8);
}
.pl-dash-metal__foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 12px;
}
.pl-dash-metal__foot span {
    color: rgba(255, 255, 255, .55);
}
.pl-dash-metal__foot strong {
    color: #5eead4;
    font-size: 15px;
    font-weight: 800;
}
.pl-dash-metal__foot small {
    margin-left: auto;
    color: rgba(255, 255, 255, .45);
    font-size: 11px;
}
@media (prefers-reduced-motion: reduce) {
    .pl-dash-metal__panel,
    .pl-dash-metal__glider,
    .pl-dash-metal__item-wrap,
    .pl-dash-metal__overview-card,
    .pl-dash-metal__chip b {
        animation: none !important;
        transition: none !important;
    }
}

/* ---- Окно помощи: умная наладка (под сводкой металла) ---- */
.pl-dash-place {
    display: grid;
    gap: 12px;
    width: 100%;
    padding: 14px 16px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .22);
    background:
        linear-gradient(165deg, #f8fafc 0%, #f1f5f9 55%, #eef2ff 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.pl-dash-place__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.pl-dash-place__title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}
.pl-dash-place__icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(99, 102, 241, .2);
    color: #4f46e5;
    flex-shrink: 0;
}
.pl-dash-place__title strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.01em;
}
.pl-dash-place__title small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}
.pl-dash-place__count {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}
.pl-dash-place__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.pl-dash-place__row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .07);
}
.pl-dash-place__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid rgba(16, 185, 129, .2);
}
.pl-dash-place__row.is-work .pl-dash-place__badge {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, .25);
}
.pl-dash-place__row.is-stuck .pl-dash-place__badge {
    background: #fef2f2;
    color: #b91c1c;
    border-color: rgba(239, 68, 68, .22);
}
.pl-dash-place__text {
    font-size: 13px;
    line-height: 1.45;
    color: #1e293b;
    font-weight: 600;
}
@media (max-width: 720px) {
    .pl-dash-place__row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Раскладка по станкам (модалка): позиция → установы */
dialog.modal.modal--batch-layout,
#plannedBatchLayoutModal {
    width: min(96vw, 760px);
    max-width: min(96vw, 760px);
}
#plannedBatchLayoutModal .modal__card.pl-batch {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}
.pl-batch__body {
    max-height: min(62vh, 560px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 18px 10px;
    box-sizing: border-box;
}
.pl-batch__list {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
}
.pl-batch__pos {
    min-width: 0;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.pl-batch__pos-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 8px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.pl-batch__pos-title {
    min-width: 0;
    flex: 1;
}
.pl-batch__pos-title b {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.pl-batch__pos-meta {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #64748b;
}
.pl-batch__pos-count {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.pl-batch__setups {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pl-batch__setup {
    padding: 8px 12px;
    border-top: 1px solid rgba(15, 23, 42, .05);
}
.pl-batch__setup:first-child {
    border-top: 0;
}
.pl-batch__setup.is-stuck {
    background: #fff7ed;
}
.pl-batch__setup-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.pl-batch__ust {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    text-align: center;
}
.pl-batch__machine {
    display: block;
    min-width: 0;
}
.pl-batch__select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 7px;
    border: 1px solid rgba(15, 23, 42, .14);
    background: #fff;
    font-size: 12.5px;
    line-height: 1.3;
}
.pl-batch__why {
    margin: 5px 0 0 60px;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.pl-batch__tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    background: #ecfdf5;
    color: #047857;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
@media (max-width: 720px) {
    dialog.modal.modal--batch-layout,
    #plannedBatchLayoutModal {
        width: min(100vw - 16px, 760px);
        max-width: min(100vw - 16px, 760px);
    }
    .pl-batch__body {
        padding: 8px 12px 6px;
    }
    .pl-batch__setup-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }
    .pl-batch__tag {
        grid-column: 2;
        justify-self: start;
    }
    .pl-batch__why {
        margin-left: 56px;
    }
}

.pl-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
}
.pl-hints {
    padding: 12px 14px;
    border: 1px solid #d1fae5;
    border-radius: 14px;
    background: #f0fdfa;
}
.pl-hints__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.pl-hints__head strong {
    display: block;
    font-size: 13px;
    color: #0f766e;
}
.pl-hints__head span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
}
.pl-hints__list,
.pl-hints__stuck {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}
.pl-hints__list li,
.pl-hints__stuck li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: baseline;
    font-size: 12px;
    color: #334155;
}
.pl-hints__list b,
.pl-hints__stuck b {
    font-weight: 750;
    color: #0f172a;
}
.pl-hints__list span { color: #0f766e; font-weight: 650; }
.pl-hints__stuck { margin-top: 8px; }
.pl-hints__stuck span { color: #b91c1c; }
.pl-hints__more {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 11px;
}
.pl-hero__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.pl-kpi {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
    transition: transform .18s ease, box-shadow .18s ease;
}
.pl-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}
.pl-kpi__icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
}
.pl-kpi__icon svg {
    width: 22px;
    height: 22px;
}
.pl-kpi__body {
    min-width: 0;
    flex: 1 1 auto;
}
.pl-kpi span {
    display: block;
    color: #7a828c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pl-kpi b {
    display: block;
    margin-top: 6px;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -.03em;
    color: #151a21;
}
.pl-kpi small {
    display: block;
    margin-top: 6px;
    color: #8a9199;
    font-size: 12px;
}
.pl-kpi--match {
    border-left: 4px solid #19a974;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(25, 169, 116, .12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}
.pl-kpi--match .pl-kpi__icon {
    background: #ecfdf5;
    color: #0f766e;
}
.pl-kpi--qty {
    border-left: 4px solid #0ea5e9;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(14, 165, 233, .10), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}
.pl-kpi--qty .pl-kpi__icon {
    background: #e0f2fe;
    color: #0284c7;
}
.pl-kpi--work {
    border-left: 4px solid #3b82f6;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(57, 132, 231, .12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}
.pl-kpi--work .pl-kpi__icon {
    background: #eff6ff;
    color: #2563eb;
}
.pl-kpi--time {
    border-left: 4px solid #8b5cf6;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(137, 87, 229, .10), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8f5ff 100%);
}
.pl-kpi--time .pl-kpi__icon {
    background: #f5f3ff;
    color: #7c3aed;
}
.pl-kpi__bar {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: #e8ebf0;
    overflow: hidden;
}
.pl-kpi__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #19a974, #3ecf8e);
}

.pl-metal {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e6e8ec;
    background:
        linear-gradient(145deg, rgba(26, 31, 38, .92), rgba(42, 49, 58, .96)),
        #1a1f26;
    color: #fff;
    box-shadow: 0 14px 34px rgba(20, 24, 30, .16);
}
.pl-metal__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.pl-metal__head-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(45, 212, 191, .12);
    color: #5eead4;
}
.pl-metal__head-icon svg {
    width: 22px;
    height: 22px;
}
.pl-metal__head strong {
    font-size: 14px;
}
.pl-metal__head small {
    display: block;
    margin-top: 2px;
    color: rgba(255,255,255,.55);
    font-size: 12px;
    line-height: 1.45;
}
.pl-metal__empty {
    color: rgba(255,255,255,.55);
    font-size: 12px;
}
.pl-metal__list {
    display: grid;
    gap: 8px;
}
.pl-metal__row {
    display: grid;
    grid-template-columns: minmax(90px, 1.1fr) 1.4fr auto;
    gap: 10px;
    align-items: center;
}
.pl-metal__label {
    display: grid;
    gap: 1px;
    min-width: 0;
}
.pl-metal__label b {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-metal__label span {
    color: rgba(255,255,255,.45);
    font-size: 10px;
}
.pl-metal__track {
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    overflow: hidden;
}
.pl-metal__track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #2dd4bf);
}
.pl-metal__row.is-unknown .pl-metal__track i {
    background: linear-gradient(90deg, #64748b, #94a3b8);
}
.pl-metal__qty {
    display: grid;
    gap: 1px;
    justify-items: end;
    font-size: 12px;
    font-weight: 700;
    color: #2dd4bf;
    white-space: nowrap;
}
.pl-metal__qty b {
    font-size: 12px;
}
.pl-metal__qty span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.82);
}
.pl-metal__qty .pl-metal__weight {
    color: #99f6e4;
    font-size: 10px;
}
.pl-metal__qty .pl-metal__warn {
    color: #fbbf24;
    font-size: 10px;
    font-weight: 600;
}
.pl-metal__foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 12px;
}
.pl-metal__foot span {
    color: rgba(255,255,255,.55);
}
.pl-metal__foot-values {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.pl-metal__foot strong {
    font-size: 16px;
    color: #5eead4;
    line-height: 1.1;
}
.pl-metal__foot .pl-metal__foot-weight {
    font-size: 13px;
    color: rgba(255,255,255,.72);
    font-weight: 650;
}
.pl-metal__foot small {
    margin-left: auto;
    color: rgba(255,255,255,.45);
    font-size: 11px;
}

.pl-dayboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 4px;
}
.pl-dayboard__item {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,247,251,.96));
  border: 1px solid rgba(20, 28, 40, .08);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.pl-dayboard__item span {
  font-size: 11px;
  letter-spacing: .02em;
  color: #5b6573;
  text-transform: uppercase;
}
.pl-dayboard__item b {
  font-size: 22px;
  line-height: 1.1;
  color: #151a21;
}
.pl-dayboard__item--wait b { color: #1d6fa5; }
.pl-dayboard__item--setup b { color: #2457c5; }
.pl-dayboard__item--work b { color: #0f7a6c; }
.pl-dayboard__item--done b { color: #2f7d32; }
.pl-dayboard__item--overdue.is-hot {
  border-color: rgba(180, 40, 40, .35);
  background: linear-gradient(180deg, #fff5f4, #ffe8e6);
}
.pl-dayboard__item--overdue.is-hot b { color: #b42318; }
.pl-chip--overdue,
.pl-setup--overdue .pl-chip--overdue {
  background: #b42318;
  color: #fff;
}
.pl-setup--overdue {
  outline: 1px solid rgba(180, 35, 24, .35);
  border-radius: 10px;
  background: rgba(180, 35, 24, .06);
}
.pl-tile__note {
  color: #6b4e16;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-tile__extras {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 14px;
  padding: 6px 10px 8px;
  border-top: 1px solid #eef0f3;
  background: #fafbfc;
}
.pl-note {
  margin: 0;
  min-width: 160px;
  flex: 1 1 180px;
}
.pl-note summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #5b6573;
  user-select: none;
  list-style: none;
}
.pl-note summary::-webkit-details-marker { display: none; }
.pl-note[open] { flex: 1 1 100%; }
.pl-note__form {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}
.pl-note__form textarea {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  font: inherit;
  box-sizing: border-box;
}
.pl-deadline-form {
  display: inline-flex;
  align-items: end;
  gap: 6px;
  margin: 0;
  flex: 0 0 auto;
}
.pl-deadline-form label {
  display: grid;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pl-deadline-form input[type="date"] {
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #151a21;
}
.pl-chip--move {
  background: #2a3340 !important;
  color: #fff !important;
}
.pl-chip-icon {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  flex: 0 0 auto;
  line-height: 0;
  cursor: pointer;
  appearance: none;
  color: #fff;
  transition: filter .12s ease, transform .12s ease;
}
.pl-chip-icon svg {
  display: block;
  width: 13px;
  height: 13px;
}
.pl-chip-icon--assign {
  background: #e11d48;
  border-color: #be123c;
}
.pl-chip-icon--move {
  background: #2a3340;
  border-color: #1f2630;
}
.pl-chip-icon:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.pl-chip-icon:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
@media (max-width: 1100px) {
  .pl-dayboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pl-dayboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pl-toolbar { display: flex; }
.pl-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pl-pills a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid #e2e5ea;
    background: #fff;
    color: #5f6770;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.pl-pills a b { color: #151a21; }
.pl-pills a.is-on {
    background: #151a21;
    border-color: #151a21;
    color: #fff;
}
.pl-pills a.is-on b { color: #fff; }

.pl-empty {
    padding: 36px 16px;
    text-align: center;
    color: #7a828c;
    border: 1px dashed #d7dbe2;
    border-radius: 14px;
    background: #fafbfc;
    font-size: 13px;
}

.pl-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}
.pl-tile {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: none;
}
.pl-tile:hover {
    border-color: #c5ced6;
    box-shadow: none;
}
.pl-tile--wait { border-left: 3px solid #f0b429; }
.pl-tile--work { border-left: 3px solid #3984e7; }
.pl-tile--miss { border-left: 3px solid #dc4c64; }
.pl-tile--warn { border-left: 3px solid #d97706; }
.pl-tile--done { border-left: 3px solid #19a974; }

.pl-tile__strip {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(560px, 2.6fr) auto;
    gap: 8px;
    align-items: center;
    padding: 5px 8px;
    background: linear-gradient(180deg, #fbfcfd 0%, #f6f7f9 100%);
}
.pl-tile--compact {
    border-radius: 10px;
}
.pl-tile--compact .pl-tile__strip {
    padding: 4px 8px;
    gap: 6px 8px;
}
.pl-tile__main {
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e8ebf0;
}
.pl-tile__main .pl-tile__meta {
    gap: 2px 0;
    margin-top: 2px;
    color: #6b7480;
}
.pl-tile__main .pl-tile__meta > span + span::before {
    content: "·";
    margin: 0 6px;
    color: #b6bcc4;
}
.pl-tile__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.pl-tile__title-row h3 {
    flex: 1 1 auto;
    min-width: 0;
}
.pl-tile__cat {
    display: inline-block;
    margin-bottom: 2px;
    color: #8a9199;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.pl-tile__main h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-tile__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 1px;
    color: #8a9199;
    font-size: 10px;
}
.pl-tile__warn {
    color: #9a5200;
}
.pl-tile__badge {
    flex-shrink: 0;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.pl-tile__badge--wait { background: #fff6df; color: #9a6b00; }
.pl-tile__badge--work { background: #e8f1fc; color: #1d4f91; }
.pl-tile__badge--miss { background: #fdecef; color: #a61d36; }
.pl-tile__badge--warn { background: #fff1df; color: #9a5200; }
.pl-tile__badge--done { background: #e6f7ef; color: #0f7a4c; }

.pl-tile__stats {
    display: grid;
    grid-template-columns:
        minmax(96px, 1.4fr)   /* покрытие */
        minmax(72px, 1fr)     /* направление */
        minmax(64px, 0.75fr)  /* кол-во */
        minmax(110px, 1.6fr)  /* металл */
        minmax(52px, 0.55fr)  /* чертеж */
        minmax(72px, 0.85fr)  /* МК */
        minmax(44px, 0.45fr)  /* уст */
        minmax(108px, 1.35fr) /* дата завершения */
        minmax(100px, 1.25fr);/* статус */
    gap: 5px;
    padding: 0;
}
.pl-tile__stats > div {
    padding: 4px 8px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e8ebf0;
    min-width: 0;
    text-align: center;
}
.pl-tile__stats small {
    display: block;
    color: #8a9199;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pl-tile__stats b {
    display: block;
    margin-top: 0;
    font-size: 11px;
    color: #151a21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.pl-tile__drawing.is-ok {
    border-color: #cfe9dc;
    background: #f3fbf7;
}
.pl-tile__drawing.is-ok b,
.pl-tile__drawing.is-ok a {
    color: #0f7a4c;
    text-decoration: none;
}
.pl-tile__drawing.is-ok a:hover {
    text-decoration: underline;
}
.pl-tile__drawing.is-miss {
    border-color: #f0c9d0;
    background: #fff1f3;
}
.pl-tile__drawing.is-miss b {
    color: #a84454;
}
.pl-tile__status b {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -.01em;
}
.pl-tile__status--wait b { color: #9a6b00; }
.pl-tile__status--work b { color: #1d4f91; }
.pl-tile__status--miss b { color: #a61d36; }
.pl-tile__status--warn b { color: #9a5200; }
.pl-tile__status--done b { color: #0f7a4c; }
.pl-tile__eta {
    background: #eef6ff !important;
    border-color: #bfd6f5 !important;
}
.pl-tile__eta.is-approx {
    background: #f4f7fb !important;
    border-color: #d5dee8 !important;
}
.pl-tile__eta.is-clash {
    background: #fff7ed !important;
    border-color: #fdba74 !important;
}
.pl-tile__eta.is-clash b {
    color: #9a3412;
}
.pl-tile__eta b {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
    color: #123a6b;
}
.pl-finish-clash {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #fdba74;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #7c2d12;
}
.pl-finish-clash__icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(234, 88, 12, .12);
    color: #c2410c;
}
.pl-finish-clash__body {
    min-width: 0;
    flex: 1;
}
.pl-finish-clash__body strong {
    display: block;
    margin-bottom: 4px;
    font-size: .95rem;
}
.pl-finish-clash__body p {
    margin: 0 0 6px;
    font-size: .86rem;
    line-height: 1.4;
}
.pl-finish-clash__body p:last-child {
    margin-bottom: 0;
}
.pl-tile__deadline--overdue {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
}
.pl-tile__deadline--overdue b,
.pl-tile__deadline--hot b { color: #9f1239; }
.pl-tile__deadline--warn { background: #fff7ed !important; border-color: #fed7aa !important; }
.pl-deadline-form input[type="date"] {
    width: 100%;
    max-width: 11.5rem;
    font: inherit;
    font-weight: 700;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
}
.pl-tile__side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.pl-tile__side form { margin: 0; }
.pl-define {
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800;
}
.pl-x {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #a0a6ae;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}
.pl-x:hover { background: #fdecef; color: #a61d36; }
.pl-edit {
    width: 28px;
    height: 28px;
    border: 1px solid #d8e2ea;
    border-radius: 8px;
    background: #fff;
    color: #0a6b6b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex: 0 0 auto;
}
.pl-edit:hover { background: #e6f7f4; border-color: #0a6b6b; color: #085555; }

.pl-tile__setups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4px;
    padding: 4px 6px 6px;
    border-top: 1px solid #eef0f3;
    background: #f4f6f8;
}
.pl-tile--compact .pl-tile__setups {
    padding: 3px 6px 5px;
}
.pl-setup {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    min-height: 30px;
    padding: 3px;
    border: 1px solid #e5e7eb;
    border-left-width: 3px;
    border-radius: 7px;
    background: #fff;
}
.pl-setup--done { border-color: #bbf7d0; border-left-color: #16a34a; background: #f7fdf9; }
.pl-setup--work { border-color: #99f6e4; border-left-color: #0d9488; background: #f3fbfa; }
.pl-setup--setup { border-color: #93c5fd; border-left-color: #2563eb; background: #f5f9ff; }
.pl-setup--setup-wait { border-color: #bfdbfe; border-left-color: #60a5fa; background: #f8fbff; }
.pl-setup--incident { border-color: #fca5a5; border-left-color: #dc2626; background: #fff6f6; }
.pl-setup--removed,
.pl-setup--frozen { border-color: #fdba74; border-left-color: #ea580c; background: #fff8f1; }
.pl-setup--ready { border-color: #fda4af; border-left-color: #e11d48; background: #fff5f7; }
.pl-setup--wait { border-color: #e5e7eb; border-left-color: #9ca3af; background: #fff; }
.pl-setup--rework { border-color: #fcd34d; border-left-color: #d97706; background: #fffbeb; }

.pl-setup__cells {
    display: grid;
    grid-template-columns: 52px 52px minmax(56px, 72px) minmax(0, 1fr) 34px;
    gap: 4px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}
.pl-scell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 6px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}
.pl-scell--ust {
    background: #111827;
    border-color: #111827;
    color: #fff;
    font-weight: 800;
}
.pl-scell--ust.is-rework {
    background: #d97706;
    border-color: #d97706;
}
.pl-scell--machine {
    background: #1f2937;
    border-color: #1f2937;
    color: #fff;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.pl-scell--machine.is-hint {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0f766e;
}
.pl-scell--machine.is-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}
.pl-scell--machine.is-bad {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
button.pl-scell--machine-btn {
    cursor: pointer;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}
button.pl-scell--machine-btn:hover {
    filter: brightness(0.97);
}
button.pl-scell--machine-btn:focus-visible {
    outline: 2px solid rgba(15, 118, 110, .45);
    outline-offset: 1px;
}
.pl-setup__hint {
    margin: 2px 2px 0;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.25;
    color: #0f766e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-setup__hint.is-warn { color: #b45309; }
.pl-setup__hint.is-bad { color: #b91c1c; }
.pl-scell--qty {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -.02em;
}
.pl-scell--status {
    justify-content: flex-start;
    max-width: 100%;
}
.pl-scell--done { background: #dcfce7; border-color: #86efac; color: #166534; }
.pl-scell--work { background: #ccfbf1; border-color: #5eead4; color: #115e59; }
.pl-scell--setup { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.pl-scell--setup-wait { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.pl-scell--overdue { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.pl-scell--incident { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.pl-scell--removed,
.pl-scell--frozen { background: #ffedd5; border-color: #fdba74; color: #9a3412; }
.pl-scell--ready { background: #ffe4e6; border-color: #fda4af; color: #9f1239; }
.pl-scell--wait { background: #f3f4f6; border-color: #e5e7eb; color: #4b5563; }
.pl-scell--rework { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.pl-scell--actions {
    padding: 0 2px;
    gap: 2px;
    min-width: 34px;
}
.pl-scell--actions .pl-chip-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
}
.pl-scell__empty {
    color: #9ca3af;
    font-weight: 700;
}

.pl-setup__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.pl-setup__badge--rework { background: #d97706; }
.pl-setup__text {
    display: none;
}
.pl-setup__name {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.pl-setup__meta {
    flex: 0 0 auto;
    color: #6b7280;
    font-size: 10px;
    white-space: nowrap;
}
.pl-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    margin-left: auto;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
}
.pl-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.15;
    white-space: nowrap;
}
.pl-chip--done { background: #dcfce7; border-color: #86efac; color: #166534; }
.pl-chip--work { background: #ccfbf1; border-color: #5eead4; color: #115e59; }
.pl-chip--setup { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.pl-chip--setup-wait { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.pl-chip--incident { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.pl-chip--removed,
.pl-chip--frozen { background: #d5f3ee; border-color: #fdba74; color: #9a3412; }
.pl-chip--ready { background: #ffe4e6; border-color: #fda4af; color: #9f1239; }
.pl-chip--wait { background: #f3f4f6; border-color: #e5e7eb; color: #4b5563; }
.pl-chip--rework { background: #fef3c7; border-color: #2dd4bf; color: #92400e; }
.pl-chip--muted {
    background: #fff;
    border-color: #e5e7eb;
    color: #374151;
    font-variant-numeric: tabular-nums;
}
.pl-chip--machine {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #111827;
    border-color: #111827;
    color: #fff;
}
.pl-chip--machine em {
    font-style: normal;
    font-weight: 800;
    opacity: .7;
    margin-right: 4px;
}
.pl-chip--machine-num {
    max-width: none;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.pl-chip--note {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #fff;
    border-color: #e5e7eb;
    color: #6b7280;
    font-weight: 600;
}
.pl-chip--action {
    cursor: pointer;
    appearance: none;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    background: #e11d48;
    border-color: #be123c;
    color: #fff;
    transition: filter .12s ease;
}
.pl-chip--action:hover:not(:disabled) { filter: brightness(.96); }
.pl-chip--action:disabled { opacity: .55; cursor: not-allowed; }

/* legacy cells (if any) */
.pl-cells, .pl-cell { display: none !important; }

.button--xs {
    padding: 3px 9px;
    font-size: 11px;
    min-height: 26px;
}

@media (max-width: 1100px) {
    .pl-tile__strip {
        grid-template-columns: minmax(140px, 1fr) minmax(0, 1.8fr) auto;
    }
    .pl-tile__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .pl-tile__eta {
        grid-column: span 2;
    }
}
@media (max-width: 1200px) {
    .pl-dash__stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .pl-dash__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pl-dash-metal__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-hero { grid-template-columns: 1fr; }
    .pl-hints__head { flex-direction: column; }
    .pl-tile__strip {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .pl-tile__side { justify-content: flex-start; }
}
@media (max-width: 640px) {
    .pl-dash__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-dash-metal__list { grid-template-columns: 1fr; }
    .pl-dash-metal__metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pl-hero__grid { grid-template-columns: 1fr; }
    .pl-tile__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-tile__eta { grid-column: span 2; }
    .pl-metal__row { grid-template-columns: 1fr; gap: 4px; }
    .pl-tile__setups { grid-template-columns: 1fr; }
}

.shift-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}
.shift-board-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .03);
}
.shift-board-card header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}
.shift-board-card header h3 {
    margin: 2px 0;
    font-size: 16px;
}
.shift-board-card header small {
    color: #8a9199;
    font-size: 11px;
}
.shift-board-card--pending { border-color: #f0d39a; }
.shift-board-card--in_progress,
.shift-board-card--progress { border-color: #c5daf5; }
.shift-board-card--done { border-color: #b7e4cb; }
.shift-board-card__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.shift-board-card__body > div,
.shift-board-card__body > label {
    display: grid;
    gap: 3px;
    padding: 8px;
    border: 1px solid #eef0f2;
    border-radius: 8px;
    background: #fafbfc;
}
.shift-board-card__body span {
    color: #8a9199;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.shift-board-card__body b,
.shift-board-card__body input {
    font-size: 13px;
}
.shift-board-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    grid-column: 1 / -1;
}
.shift-board-complete {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
    width: 100%;
}
.shift-board-complete label {
    display: grid;
    gap: 4px;
    min-width: 120px;
}
.shift-board-lines {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}
.shift-board-lines li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 7px;
    background: #f7f8fa;
    font-size: 12px;
}
.shift-board-lines em {
    color: #8a9199;
    font-style: normal;
}
.shift-board-closed {
    grid-column: 1 / -1;
    margin: 0;
    color: #176848;
    font-size: 12px;
}
.shift-op-form .shift-board-card__actions {
    margin-top: 4px;
}
.setup-history-panel {
    padding: 0;
    overflow: visible;
}
.setup-history-panel .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.setup-history-table {
    width: max(100%, 1180px);
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}
.setup-history-table th,
.setup-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}
.setup-history-table th {
    color: #8b929b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: rgba(248, 250, 252, .9);
    white-space: nowrap;
}
.setup-history-table tbody tr:hover {
    background: rgba(239, 246, 255, .45);
}
.setup-history-table b {
    display: block;
    font-size: 12px;
    color: #0f172a;
}
.setup-history-muted {
    display: block;
    margin-top: 2px;
    color: #7b8491;
    font-size: 11px;
}
.setup-history-table th.setup-history-actions,
.setup-history-table td.setup-history-actions {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    width: 1%;
    min-width: 72px;
    padding-left: 6px;
    padding-right: 8px;
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -8px 0 12px -12px rgba(15, 23, 42, .35);
    z-index: 1;
}
.setup-history-table thead th.setup-history-actions {
    background: rgba(248, 250, 252, .98);
}
.setup-history-table tbody tr:hover td.setup-history-actions {
    background: #f5f9ff;
}
.shift-setup-complete {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
}
.shift-setup-complete label {
    display: grid;
    gap: 4px;
    min-width: 120px;
}
.shift-setup-complete label span {
    color: #8a9199;
    font-size: 10px;
    text-transform: uppercase;
}
.shift-setup-card__busy {
    color: #8a4b00;
    font-size: 12px;
    padding: 8px 0;
}

/* ?????????????????????????????????? ????????????????????????????? ???????????????????????????? */
.shift-setup-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.scm-card--compact .scm-compact__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: start;
    padding: 10px 12px 6px 14px;
}
.scm-card--compact .rcm-card__id {
    min-width: 40px;
    height: 32px;
    padding: 0 8px;
    border-radius: 9px;
}
.scm-card--compact .rcm-card__id strong { font-size: 15px; }
.scm-compact__title h3 {
    margin: 0;
    font-size: 14px;
    letter-spacing: -.02em;
}
.scm-compact__line {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.scm-compact__meta {
    display: grid;
    gap: 4px;
    justify-items: end;
    text-align: right;
    font-size: 10px;
    color: #8b929b;
    white-space: nowrap;
}
.scm-compact__meta b {
    color: #0f172a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.scm-cells {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0 12px 8px 14px;
    min-width: 0;
}
.scm-cells__row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    align-items: stretch;
}
/* ?????? 1: ???????????????????????? ?? ?????????????? ??????, ????????????????/?????????????????????? ?????????? */
.scm-cells__row--1 {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 0.95fr);
}
.scm-cells .rcm-cell {
    padding: 4px 8px;
    gap: 2px;
    min-height: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 8px;
}
.scm-cells .rcm-cell > span {
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.scm-cells .rcm-cell > b {
    font-size: 11px;
    line-height: 1.25;
    margin: 0;
}
.scm-cells .rcm-cell > em {
    display: block;
    margin: 0;
    font-size: 9px;
    line-height: 1.2;
    color: #8b929b;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.scm-cells__row--1 .rcm-cell {
    padding: 3px 6px;
}
.scm-cells__row--1 .rcm-cell > b {
    font-size: 11px;
}
.scm-cells__row--2 .rcm-cell,
.scm-cells__row--3 .rcm-cell {
    padding: 4px 8px;
}
.scm-cells .rcm-cell a,
.scm-drawing-link {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}
.scm-cells .rcm-cell a:hover,
.scm-drawing-link:hover { text-decoration: underline; }
.scm-mode-select {
    width: 100%;
    min-height: 26px;
    height: 26px;
    margin-top: 0;
    padding: 0 6px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 650;
    background: #fff;
}
.scm-mode-select:disabled {
    opacity: .65;
    background: #f8fafc;
}
.shift-setup-complete select {
    min-height: 34px;
    min-width: 160px;
    padding: 0 8px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
}
@media (max-width: 980px) {
    .scm-cells__row,
    .scm-cells__row--1 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .scm-cells__row,
    .scm-cells__row--1 {
        grid-template-columns: 1fr;
    }
}
.scm-compact__actions {
    padding: 0 12px 10px 14px !important;
}
.scm-compact__gantt {
    padding: 0 12px 8px 14px;
    min-width: 0;
}
.scm-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
    padding: 0 16px 14px 18px;
}

/* ????????????????-????????????????????????? */
.rcm-gantt--mini {
    --rcm-label-w: 72px;
    padding: 8px 10px 6px;
}
.rcm-gantt--mini .rcm-gantt__head {
    margin-bottom: 4px;
}
.rcm-gantt--mini .rcm-gantt__head strong { font-size: 10px; }
.rcm-gantt--mini .rcm-gantt__clock { font-size: 10px; }
.rcm-gantt--mini .rcm-gantt__axis { height: 14px; margin-bottom: 2px; }
.rcm-gantt--mini .rcm-gantt__axis span { font-size: 9px; }
.rcm-gantt--mini .rcm-gantt__track {
    min-height: 16px;
    margin-bottom: 2px;
}
.rcm-gantt--mini .rcm-gantt__track em {
    width: auto;
    font-size: 9px;
}
.rcm-gantt--mini .rcm-gantt__lane { height: 10px; }
.rcm-gantt--mini .rcm-gantt__legend { display: none; }

/* ??????????????????????????????????????? ??????? ?????????????????????????????????? ????????????????????????????????????????? */
.prod-board {
    display: grid;
    gap: 14px;
}
.prod-card {
    --prod-accent: #94a3b8;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
}
.prod-card--planned { --prod-accent: #c27803; }
.prod-card--progress { --prod-accent: #1d4ed8; }
.prod-card.is-locked { opacity: .97; }
.prod-card__side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #fff;
}
.prod-card__num {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}
.prod-card__shift {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .65;
}
.prod-card__pct {
    margin-top: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.prod-card__main {
    padding: 14px 16px 16px;
    min-width: 0;
}
.prod-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.prod-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.prod-card__title-row h3 { margin: 0; min-width: 0; }
.prod-card__title-row .rc-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    border: 1px solid transparent;
}
.prod-card__title-row .rc-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.prod-card__title-row .rc-status--free {
    color: #5f6670; background: #eef0f2; border-color: #e2e5e9;
}
.prod-card__title-row .rc-status--idle {
    color: #475569; background: #e2e8f0; border-color: #cbd5e1;
}
.prod-card__title-row .rc-status--setup,
.prod-card__title-row .rc-status--planned {
    color: #92400e; background: #fff7ed; border-color: #fed7aa;
}
.prod-card__title-row .rc-status--progress {
    color: var(--accent-dark); background: #d1fae5; border-color: #a7f3d0;
}
.prod-card__title-row .rc-status--done {
    color: #065f46; background: #ecfdf5; border-color: #a7f3d0;
}
.prod-card__title-row .rc-status--incident {
    color: #8a1f32; background: #fde8ec; border-color: #fecdd3;
}
.prod-card__head h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.02em;
    color: #0f172a;
}
.prod-card__head p {
    margin: 3px 0 0;
    color: #7b8491;
    font-size: 11px;
}
.prod-card__meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}
.prod-card__meta--row1 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
}
.prod-card__meta--row2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.prod-card__meta--row3 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.prod-card__good {
    border-color: rgba(21, 128, 61, .18) !important;
    background:
        linear-gradient(180deg, rgba(240, 253, 244, .95), rgba(255,255,255,.92)) !important;
}
.prod-card__good b {
    color: #15803d !important;
}
.prod-card__scrap {
    border-color: rgba(180, 83, 9, .18) !important;
    background:
        linear-gradient(180deg, rgba(255, 247, 237, .95), rgba(255,255,255,.92)) !important;
}
.prod-card__scrap b {
    color: #c2410c !important;
}
.prod-card__worktime {
    border-color: rgba(79, 70, 229, .16) !important;
    background:
        linear-gradient(180deg, rgba(238, 242, 255, .95), rgba(255,255,255,.92)) !important;
}
.prod-card__worktime b {
    color: #4338ca !important;
    font-size: 15px !important;
}
.prod-card__meta > div {
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 8px;
    background: rgba(255,255,255,.9);
}
.prod-card__meta--row1 > div {
    padding: 4px 6px;
}
.prod-card__meta-wide {
    grid-column: 1 / -1;
}
.prod-card__fact {
    border-color: rgba(29, 78, 216, .18) !important;
    background:
        linear-gradient(180deg, rgba(239, 246, 255, .95), rgba(255,255,255,.92)) !important;
}
.prod-card__fact b {
    color: #1d4ed8 !important;
    font-size: 15px !important;
}
.prod-card__meta span {
    display: block;
    color: #8b929b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.prod-card__meta b {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.prod-card__meta--row1 b {
    font-size: 11px;
    margin-top: 1px;
}
.prod-card__meta em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}
.prod-card__progress { display: none; }
.prod-card__wait {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 9px 11px;
    border: 1px solid rgba(194, 120, 3, .25);
    border-radius: 12px;
    background: rgba(255, 251, 235, .92);
}
.prod-card__wait strong {
    font-size: 11px;
    color: #92400e;
    font-weight: 650;
}
.prod-card__form {
    display: grid;
    grid-template-columns: 112px 112px minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-top: 2px;
}
.prod-card__form label {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.prod-card__form label span {
    color: #8b929b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.prod-card__form input {
    min-height: 38px;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    border: 1px solid #d7dde5;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: #fff;
    box-sizing: border-box;
}
.prod-card__form-note input {
    font-size: 13px !important;
    font-weight: 600 !important;
}
.prod-card__form-submit,
.prod-card__form .button {
    min-height: 38px;
    white-space: nowrap;
    justify-self: end;
}
.prod-card__form > .prod-card__remain-hint {
    grid-column: 1 / -1;
    margin: 0;
}
.prod-card__form-transferred {
    padding: 6px 10px;
    border-radius: 8px;
    background: #f0fdfa;
    color: #0f766e !important;
    font-size: 12px;
}
.prod-card__form-transferred [data-op-qc-remainder-preview] {
    display: block;
    margin-top: 4px;
    font-weight: 800;
}
.prod-card__form-transferred [data-op-qc-remainder-preview].is-bad { color: #b91c1c; }
.prod-card__form-transferred [data-op-qc-remainder-preview][hidden] { display: none; }
.prod-card__form-bar {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}
.prod-card__form-ktu {
    margin: 0;
    font-size: 12px;
    font-weight: 650;
    color: #64748b;
}
.prod-card__form-ktu b { color: var(--accent-dark); font-size: 14px; }
.prod-card__form-ktu span { font-weight: 500; }
.prod-card__form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
.op-qc-modal__lead {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0fdfa;
    border: 1px solid rgba(15, 118, 110, .18);
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}
.op-qc-modal .form-grid { grid-template-columns: 1fr 1fr; }
.op-qc-modal__wide { grid-column: 1 / -1; }
.op-qc-modal__stat { margin: 12px 0 0; font-size: 12px; }
.scm-vv-hint {
    display: block !important;
    margin-top: 6px !important;
    line-height: 1.35;
    white-space: normal !important;
    color: #64748b !important;
    font-size: 10px !important;
    font-weight: 600 !important;
}
@media (max-width: 1100px) {
    .prod-card__meta--row1 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .prod-card { grid-template-columns: 60px minmax(0, 1fr); }
    .prod-card__meta,
    .prod-card__meta--row1,
    .prod-card__meta--row2 { grid-template-columns: 1fr 1fr; }
    .prod-card__meta--row3 { grid-template-columns: 1fr 1fr; }
    .prod-card__meta-wide { grid-column: 1 / -1; }
    .prod-card__num { font-size: 18px; }
    .prod-card__form {
        grid-template-columns: 1fr 1fr;
    }
    .prod-card__form-note {
        grid-column: 1 / -1;
    }
    .prod-card__form-actions { width: 100%; }
    .prod-card__form-actions .button { flex: 1 1 0; }
}

.prod-card__meta--top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 8px;
}
.prod-card__pos b {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.prod-card__time {
    border-color: rgba(15, 118, 110, .18) !important;
    background: linear-gradient(180deg, rgba(240, 253, 250, .95), rgba(255,255,255,.92)) !important;
}
.prod-card__time b { color: var(--accent-dark) !important; }
.prod-card__time--shift {
    border-color: rgba(100, 116, 139, .2) !important;
    background: linear-gradient(180deg, rgba(248, 250, 252, .95), rgba(255,255,255,.92)) !important;
}
.prod-card__time--shift b { color: #334155 !important; }
.prod-card__remain {
    border-color: rgba(194, 120, 3, .22) !important;
    background: linear-gradient(180deg, rgba(255, 251, 235, .95), rgba(255,255,255,.92)) !important;
}
.prod-card__remain b { color: var(--accent-dark) !important; font-size: 15px !important; }
.prod-card__form-hint {
    flex: 1 1 100%;
    margin: 0 0 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

.ops-dash {
    display: grid;
    gap: 12px;
    margin: 0 0 16px;
}
.ops-dash__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ops-dash__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.ops-dash__nav a.is-active {
    border-color: rgba(29, 78, 216, .35);
    background: #eff6ff;
    color: #1d4ed8;
}
.ops-dash__print-btn {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-left: auto;
    padding: 0 14px;
    border: 1px solid rgba(22, 50, 79, .35);
    border-radius: 999px;
    background: #16324f;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.ops-dash__print-btn:hover {
    background: #0f2438;
}
.ops-label-print-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(52vh, 420px);
    overflow: auto;
}
.ops-label-print-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 12px;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}
.ops-label-print-item:hover {
    border-color: rgba(22, 50, 79, .35);
    background: #eff6ff;
}
.ops-label-print-item strong {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.ops-label-print-item span {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}
.ops-dash__stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.ops-dash__stats article {
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 14px;
    background:
        linear-gradient(165deg, #fff, #f8fafc),
        radial-gradient(80% 60% at 0% 0%, rgba(29,78,216,.05), transparent 55%);
}
.ops-dash__stats small {
    display: block;
    color: #8b929b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.ops-dash__stats b {
    display: block;
    margin-top: 4px;
    font-size: 22px;
    letter-spacing: -.03em;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}
.ops-dash__stats em {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
}
.ops-dash__stats .is-done b { color: #1d4ed8; }
.ops-dash__stats .is-scrap b { color: #b91c1c; }
.ops-dash__stats .is-week b { color: var(--accent-dark); }
.ops-dash__stats .is-remain b { color: var(--accent-dark); }
.setup-dash {
    margin: 0 0 14px;
}
.setup-dash .ops-dash__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
    .setup-dash .ops-dash__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rc-dash {
    margin: 0 0 14px;
}
.rc-dash .ops-dash__stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.rc-dash .ops-dash__stats:has(article:nth-child(6)) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1100px) {
    .rc-dash .ops-dash__stats,
    .rc-dash .ops-dash__stats:has(article:nth-child(6)) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 720px) {
    .rc-dash .ops-dash__stats,
    .rc-dash .ops-dash__stats:has(article:nth-child(6)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.ops-history-panel { padding: 0; overflow: visible; }
.ops-history-panel .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.ops-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    font-size: 12px;
    color: #64748b;
}
.ops-history-perpage label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}
.ops-history-perpage select {
    min-width: 64px;
    padding: 4px 8px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
}
.ops-history-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}
.ops-history-table.data-table th,
.ops-history-table.data-table td {
    padding: 8px 6px;
    border-top: 0;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    font-size: 11px;
    vertical-align: middle;
    text-align: center;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
}
.ops-history-table.data-table thead th {
    padding: 8px 6px;
    color: #8b929b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    background: rgba(248, 250, 252, .9);
    line-height: 1.2;
    white-space: nowrap;
}
.ops-h-col--date { width: 5.5%; }
.ops-h-col--machine { width: 3%; }
.ops-h-col--route { width: 8%; }
.ops-h-col--setup-name { width: 14%; }
.ops-h-col--setup-no { width: 3%; }
.ops-h-col--num { width: 3.5%; }
.ops-h-col--op { width: 7%; }
.ops-h-col--shift { width: 2.5%; }
.ops-h-col--time { width: 3.5%; }
.ops-h-col--work { width: 3.5%; }
.ops-h-col--note { width: 14%; }
.ops-h-col--ktu { width: 4.5%; }
.ops-h-col--actions { width: 7%; }
.ops-history-table b { display: inline; color: #0f172a; }
.ops-history-table small { display: block; margin-top: 2px; color: #7b8491; font-size: 11px; }
.ops-history-table .ops-h-col--route,
.ops-history-table .ops-h-col--setup-name,
.ops-history-table td:nth-child(3),
.ops-history-table td:nth-child(4),
.ops-history-table td:nth-child(11),
.ops-history-table .ops-history-note {
    text-align: left;
}
.ops-history-table td:nth-child(3),
.ops-history-table td:nth-child(4),
.ops-history-table td:nth-child(11) {
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ops-history-table .ops-h-col--num,
.ops-history-table td:nth-child(5),
.ops-history-table td:nth-child(6),
.ops-history-table td:nth-child(7),
.ops-history-table td:nth-child(8),
.ops-history-table td:nth-child(9),
.ops-history-table td:nth-child(10),
.ops-history-table td:nth-child(2),
.ops-history-table td:nth-child(12),
.ops-history-table td:nth-child(13),
.ops-history-table td:nth-child(14),
.ops-history-table td:nth-child(15),
.ops-history-table td:nth-child(17) {
    white-space: nowrap;
}
.ops-history-note {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.ops-history-table th.ops-history-actions,
.ops-history-table td.ops-history-actions {
    white-space: nowrap;
    overflow: visible;
    width: 7%;
    min-width: 68px;
    padding-left: 4px;
    padding-right: 6px;
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -8px 0 12px -12px rgba(15, 23, 42, .35);
    z-index: 1;
}
.mon-ktu-header {
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.mon-ktu-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.mon-ktu-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mon-ktu-range label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.mon-ktu-range input[type="date"] {
  min-width: 9.5rem;
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}
.mon-ktu-table th:nth-child(4) {
  min-width: 7.5rem;
  white-space: normal;
  line-height: 1.15;
}
.mon-ktu-panel .mon-chart-wrap {
  min-height: 280px;
}
.mon-ktu-table td:nth-child(1),
.mon-ktu-table th:nth-child(1) {
  width: 2.5rem;
}
.mon-ktu-table td:nth-child(3) b {
  color: var(--accent);
}
.mon-view-tabs .button.is-active {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-weight: 700;
}
.tablet-done__ktu {
    margin-top: 8px;
    font-size: 1.25rem;
}
.ops-ktu-modal {
  width: min(92vw, 420px);
}
.ops-ktu-modal .modal__card {
  overflow: hidden;
}
.ops-ktu-modal__body {
  display: grid;
  gap: 10px;
  padding: 22px 26px 10px;
  text-align: center;
}
.ops-ktu-modal__value {
  margin: 0;
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 118, 110, .18);
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(45, 212, 191, .16), transparent 60%),
    #f8fafc;
  color: #0f766e;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.ops-ktu-modal__body .muted {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.ops-ktu-modal .form-actions {
  justify-content: center;
}
.ops-history-table thead th.ops-history-actions {
    background: rgba(248, 250, 252, .98);
}
.ops-history-table tbody tr:hover td.ops-history-actions {
    background: #f5f9ff;
}
.ops-history-actions__btns,
.setup-history-actions__btns {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}
.ops-history-actions__btns .hist-icon-btn {
    width: 24px;
    height: 24px;
}
.ops-history-actions__btns .hist-icon-btn svg {
    width: 12px;
    height: 12px;
}
.hist-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    line-height: 0;
    flex: 0 0 auto;
}
.hist-icon-btn:hover {
    color: #0f172a;
    border-color: rgba(15, 23, 42, .22);
    background: #f8fafc;
}
.hist-icon-btn--danger {
    color: #c24141;
    border-color: rgba(194, 65, 65, .28);
    background: #fff7f7;
}
.hist-icon-btn--danger:hover {
    color: #9f1239;
    border-color: rgba(159, 18, 57, .4);
    background: #ffecec;
}
.ops-history-panel .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    max-height: none;
}
.ops-history-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(15, 23, 42, .06);
}
.ops-history-pager__pages {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ops-history-pager__pages a,
.ops-history-pager__current {
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.ops-history-pager__pages a {
    color: #334155;
    background: rgba(248, 250, 252, .95);
    border: 1px solid rgba(15, 23, 42, .08);
}
.ops-history-pager__pages a:hover {
    background: #fff;
    border-color: rgba(29, 78, 216, .25);
}
.ops-history-pager__current {
    color: #fff;
    background: #1d4ed8;
    border: 1px solid #1d4ed8;
}
.ops-history-pager .is-disabled {
    opacity: .45;
    pointer-events: none;
}
@media (max-width: 960px) {
    .ops-dash__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-history-toolbar { flex-wrap: wrap; }
}

.rc-frozen-board {
    margin: 0 0 16px;
    padding: 14px 16px 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffbeb, #fff);
}
.rc-frozen-board__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.rc-frozen-board__head h2 {
    margin: 2px 0 0;
    font-size: 16px;
    color: #0f172a;
}
.rc-frozen-board__head b { color: var(--accent-dark); font-size: 18px; }
.rc-frozen-list { display: grid; gap: 10px; }
.rc-frozen-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border: 1px solid rgba(194, 120, 3, .2);
    border-radius: 12px;
    background: #fff;
    min-width: 0;
}
.rc-frozen-card strong { display: block; font-size: 13px; color: #0f172a; }
.rc-frozen-card small,
.rc-frozen-card em {
    display: block;
    margin-top: 2px;
    color: #7b8491;
    font-size: 11px;
    font-style: normal;
}
.rc-frozen-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    justify-content: flex-end;
    text-align: right;
}
.rc-frozen-card__facts b { color: #0f172a; }
.rc-frozen-card__restore {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    grid-column: 1 / -1;
    min-width: 0;
}
.rc-frozen-card__machine {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.rc-frozen-card__machine span {
    color: #8b929b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.rc-frozen-card__machine select,
.rc-frozen-card__restore select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    max-width: 100%;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 12px;
    background: #fff;
    box-sizing: border-box;
}
.rc-frozen-card__launch {
    flex-shrink: 0;
    white-space: nowrap;
}
.rcm-head-actions {
    display: none;
}
.rcm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 8px 14px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.rcm-toolbar__group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.rcm-toolbar__group--danger {
    margin-left: auto;
}
.rcm-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #d8dee7;
    border-radius: 999px;
    background: #fff;
    color: #243041;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.rcm-tool:hover {
    background: #f1f5f9;
    border-color: #c5ceda;
    color: #0f172a;
}
.rcm-tool:active {
    transform: translateY(1px);
}
.rcm-tool--primary {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .08);
}
.rcm-tool--primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}
.rcm-tool--danger {
    color: #b42318;
    border-color: #f0c2bd;
    background: #fff8f7;
}
.rcm-tool--danger:hover {
    background: #fee4e2;
    border-color: #e8a39c;
    color: #912018;
}
.rcm-tool--warn {
    color: #a16207;
    border-color: #f5d78e;
    background: #fffbeb;
}
.rcm-tool--warn:hover {
    background: #fef3c7;
    border-color: #e8c547;
    color: #854d0e;
}
@media (max-width: 720px) {
    .rcm-toolbar {
        padding: 8px 12px 10px;
        gap: 8px;
    }
    .rcm-toolbar__group--danger {
        margin-left: 0;
        width: 100%;
    }
    .rcm-toolbar__group--danger .rcm-tool {
        width: 100%;
        justify-content: center;
    }
}
.modal.modal--crew {
    width: min(560px, calc(100vw - 28px));
    max-width: min(560px, calc(100vw - 28px));
    padding: 0;
    border: 0;
    background: transparent;
}
.modal.modal--crew::backdrop {
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.rcm-crew-modal.modal__card,
.modal.modal--crew .rcm-crew-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: min(86vh, 720px);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .9) inset,
        0 28px 64px rgba(15, 23, 42, .22);
}
.rcm-crew-modal__head.modal__header,
.rcm-crew-modal .rcm-crew-modal__head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 22px 22px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .09) 0%, transparent 58%),
        #fff;
}
.rcm-crew-modal__title {
    display: grid;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}
.rcm-crew-modal__title .eyebrow {
    margin: 0;
    color: #0f766e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.rcm-crew-modal__title h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.03em;
}
.rcm-crew-modal__lead {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rcm-crew-modal__close {
    display: grid !important;
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    border-radius: 12px !important;
    color: #64748b !important;
    background: #fff !important;
    place-items: center;
    font-size: 20px !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.rcm-crew-modal__close:hover {
    border-color: rgba(15, 23, 42, .14) !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    transform: translateY(-1px);
}
.rcm-crew-modal__body.modal__body,
.rcm-crew-modal .rcm-crew-modal__body {
    display: grid;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 16px 18px 18px;
    overflow: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 42%);
}
.rcm-crew-modal__toast {
    display: none;
    align-items: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 118, 110, .16);
    background: #ecfdf5;
    color: #065f46;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
}
.rcm-crew-modal__toast:not([hidden]) {
    display: flex;
}
.rcm-crew-modal__toast.is-error {
    border-color: rgba(185, 28, 28, .18);
    background: #fef2f2;
    color: #991b1b;
}
.rcm-crew.rcm-crew--modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    min-width: 0;
}
.rcm-crew.rcm-crew--modal .rcm-crew__block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 148px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.rcm-crew__block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 20px;
}
.rcm-crew.rcm-crew--modal .rcm-crew__label {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.rcm-crew__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
}
.rcm-crew.rcm-crew--modal .rcm-crew__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
}
.rcm-crew.rcm-crew--modal .rcm-chip {
    width: 100%;
    max-width: none;
    min-height: 42px;
    padding: 5px 34px 5px 5px;
    border-radius: 12px;
    box-shadow: none;
}
.rcm-crew.rcm-crew--modal .rcm-chip__ava {
    width: 30px;
    height: 30px;
    font-size: 10px;
}
.rcm-crew.rcm-crew--modal .rcm-chip__name {
    font-size: 13px;
    font-weight: 700;
}
.rcm-crew.rcm-crew--modal .rcm-chip__x {
    top: 50%;
    right: 8px;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    background: #0f172a;
    font-size: 14px;
}
.rcm-crew.rcm-crew--modal .rcm-chip__x:hover {
    background: #b91c1c;
}
.rcm-crew.rcm-crew--modal .rcm-add {
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1.5px dashed rgba(15, 118, 110, .38);
    border-radius: 12px;
    color: #0f766e;
    background: rgba(240, 253, 250, .55);
    font-size: 13px;
    font-weight: 700;
}
.rcm-crew.rcm-crew--modal .rcm-add:hover {
    border-color: #0f766e;
    border-style: solid;
    background: #ccfbf1;
}
.rcm-add__plus {
    display: inline-grid;
    width: 20px;
    height: 20px;
    border-radius: 7px;
    background: rgba(15, 118, 110, .12);
    color: #0f766e;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}
.rcm-crew.rcm-crew--modal .rcm-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    border: 1px dashed rgba(148, 163, 184, .45);
    border-radius: 12px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}
.rcm-crew-modal.is-busy {
    pointer-events: none;
    opacity: .78;
}
.rc-inline-picker {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 240px;
    padding: 0;
}
.rc-inline-picker .rc-picker {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.rc-inline-picker .rc-picker input[type="search"] {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    border-radius: 0;
    background: #f8fafc;
    font-size: 14px;
    box-sizing: border-box;
}
.rc-inline-picker .rc-picker__list {
    display: grid;
    gap: 0;
    max-height: min(44vh, 380px);
    padding: 6px;
    overflow: auto;
}
.rc-inline-picker .rc-picker__item {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    gap: 12px;
}
.rc-inline-picker .rc-picker__item:hover {
    background: #f8fafc;
}
.rc-inline-picker .rc-picker__item:has(input:checked) {
    border-color: rgba(15, 118, 110, .28);
    background: #f0fdfa;
}
.rc-inline-picker .rc-picker__item.is-on-machine {
    border-color: rgba(22, 163, 74, .22);
    background: #f0fdf4;
}
.rc-inline-picker .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.rc-inline-picker .form-actions .button {
    min-width: 112px;
    min-height: 40px;
}
@media (max-width: 560px) {
    .rcm-crew.rcm-crew--modal {
        grid-template-columns: 1fr;
    }
    .rcm-crew.rcm-crew--modal .rcm-crew__block {
        min-height: 0;
    }
    .rcm-crew-modal__lead {
        white-space: normal;
    }
}
.rcm-cell--made {
    border-color: rgba(29, 78, 216, .16) !important;
    background: linear-gradient(180deg, rgba(239, 246, 255, .9), rgba(255,255,255,.92)) !important;
}
.rcm-times > .rcm-cell--made {
    margin-top: -2px;
}
.rcm-cell--made b { color: #1d4ed8 !important; }
@media (max-width: 900px) {
    .rc-frozen-card { grid-template-columns: 1fr; }
    .rc-frozen-card__facts { justify-content: flex-start; text-align: left; }
}

.rc-stat {
    display: flex;
    min-height: 50px;
    padding: 6px 8px;
    border: 1px solid #e8eaed;
    border-radius: 7px;
    background: #fff;
    flex-direction: column;
    justify-content: center;
}
.rc-stat b { font-size: 12px; }
.shift-rc-fact { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.shift-rc-day {
    display: flex;
    min-height: 50px;
    padding: 4px;
    border: 1px solid #e8eaed;
    border-radius: 7px;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.shift-rc-day b { font-size: 14px; }
.shift-rc-day em {
    display: inline-flex;
    margin-top: 1px;
    padding: 1px 5px;
    border-radius: 999px;
    color: #5f6670;
    background: #eef0f2;
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
}
.shift-rc-day em.is-ok { color: #176848; background: #e5f7ee; }
.shift-rc-day em.is-low { color: #8a4b00; background: #ffe8bf; }
.rc-timeline {
    display: grid;
    gap: 6px;
    padding-left: 8px;
    border-left: 1px solid #e8eaed;
}
.rc-timeline__bars { display: grid; gap: 4px; }
.rc-timeline__bars > div {
    position: relative;
    height: 18px;
    border-radius: 5px;
    background: #eef0f2;
    overflow: hidden;
}
.rc-timeline__bars > div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w, 0%);
    border-radius: 5px;
}
.rc-timeline__bars .is-setup::before { background: #f0b429; }
.rc-timeline__bars .is-work::before { background: #16a34a; }
.rc-timeline__bars .is-incident::before { background: #dc4c64; }
.rc-timeline__bars span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    height: 100%;
    padding: 0 6px;
    align-items: center;
    color: #4d5560;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}
.rc-timeline ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 3px;
}
.rc-timeline li {
    color: #6d747d;
    font-size: 10px;
    line-height: 1.25;
}
.rc-timeline li.is-setup { color: #8a4b00; }
.rc-timeline li.is-work { color: #1f4f8a; }
.rc-timeline li.is-incident { color: #8a1f32; }

/* ???????????????????????????? ???????? ???????? ??????? ?????????????????????????????????? ????????????????????????????? */
.rc-card {
    position: relative;
    display: grid;
    gap: 0;
    border: 1px solid #e2e6eb;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.98)),
        radial-gradient(120% 80% at 0% 0%, rgba(57,132,231,.06), transparent 45%);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .05);
    overflow: hidden;
}
.rc-card__accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #9aa3ad;
}
.rc-card--planned .rc-card__accent { background: #e2a008; }
.rc-card--progress .rc-card__accent { background: #2f7de1; }
.rc-card--done .rc-card__accent { background: #1f9d66; }
.rc-card--incident .rc-card__accent { background: #d6455d; }
.rc-card__head {
    display: grid;
    grid-template-columns: 56px minmax(160px, 1.2fr) minmax(180px, 280px);
    gap: 12px 16px;
    align-items: center;
    padding: 12px 16px 10px 18px;
}
.rc-card__id {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(160deg, #1f2937, #111827);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.rc-card__id span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .55;
    line-height: 1;
}
.rc-card__id strong {
    font-size: 20px;
    letter-spacing: -.04em;
    line-height: 1;
}
.rc-card__meta h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.02em;
    line-height: 1.2;
}
.rc-card__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.rc-card__meta small { color: #7b8491; font-size: 11px; }
.rc-card__progress { min-width: 0; }
.rc-card__progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 11px;
}
.rc-card__progress-meta b { color: #111827; font-size: 13px; }
.rc-card__bar {
    height: 8px;
    border-radius: 999px;
    background: #e8ecf1;
    overflow: hidden;
}
.rc-card__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width .25s ease;
}
.rc-card--planned .rc-card__bar i { background: linear-gradient(90deg, #d97706, var(--accent)); }
.rc-card--done .rc-card__bar i { background: linear-gradient(90deg, #059669, #34d399); }
.rc-card--incident .rc-card__bar i { background: linear-gradient(90deg, #dc2626, #f87171); }

.rc-card__crew {
    padding: 0 16px 10px 18px;
    border-bottom: 1px solid #eef1f4;
}
.rc-crew { display: grid; gap: 6px; }
.rc-crew__label {
    color: #8a9199;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.rc-crew__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.rc-crew__list--compact { gap: 6px; }
.rc-crew__empty {
    color: #9aa1aa;
    font-size: 12px;
    font-style: normal;
}
.rc-crew__add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px dashed #c9d0d8;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.rc-crew__add span {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 14px;
    line-height: 1;
}
.rc-crew__add:hover {
    border-color: #9db0c4;
    background: #f8fafc;
}

.rc-person {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    min-height: 34px;
    padding: 4px 28px 4px 4px;
    border: 1px solid #e5e9ef;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
.rc-person__avatar {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -.02em;
    flex: 0 0 auto;
    background: #64748b;
}
.rc-person__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 650;
    color: #1f2937;
}
.rc-person__detach {
    position: absolute;
    top: -4px;
    right: -2px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(17,24,39,.2);
}
.rc-person__detach:hover { background: #b91c1c; }

.rc-person--steel .rc-person__avatar,
.rc-avatar--steel { background: #475569; }
.rc-person--ocean .rc-person__avatar,
.rc-avatar--ocean { background: #2563eb; }
.rc-person--forest .rc-person__avatar,
.rc-avatar--forest { background: var(--accent-dark); }
.rc-person--amber .rc-person__avatar,
.rc-avatar--amber { background: var(--accent-dark); }
.rc-person--rose .rc-person__avatar,
.rc-avatar--rose { background: #be123c; }
.rc-person--slate .rc-person__avatar,
.rc-avatar--slate { background: #334155; }
.rc-person--teal .rc-person__avatar,
.rc-avatar--teal { background: #0e7490; }
.rc-person--copper .rc-person__avatar,
.rc-avatar--copper { background: #9a3412; }

.rc-card .rc-machine__lines { display: grid; gap: 0; }
.rc-pos-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 172px;
    border-top: 1px solid #eef1f4;
    background: rgba(255,255,255,.72);
}
.rc-pos-row.is-next,
.rc-pos-row.is-queue { background: #f8fafc; }
.rc-pos-row__body { min-width: 0; padding: 10px 14px 12px 18px; }
.rc-pos-row__tag {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8f1ff;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.rc-pos-row.is-queue .rc-pos-row__tag {
    background: #eef2f6;
    color: #64748b;
}
.rc-pos-grid {
    display: none;
}
.rc-pos-table {
    display: grid;
    gap: 0;
    min-width: 0;
}
.rc-pos-table__head,
.rc-pos-table__row {
    display: grid;
    grid-template-columns: 64px minmax(110px, 1.4fr) minmax(120px, 1.1fr) 58px 64px 86px 86px 54px 118px 118px minmax(130px, 1fr);
    gap: 0;
    align-items: stretch;
}
.rc-pos-table--manage .rc-pos-table__head,
.rc-pos-table--manage .rc-pos-table__row {
    grid-template-columns: 64px minmax(110px, 1.4fr) minmax(120px, 1.1fr) 58px 64px 86px 86px 54px 118px 118px minmax(130px, 1fr) 52px;
}
.rc-pos-table__head {
    margin-bottom: 2px;
}
.rc-pos-table__head span {
    padding: 0 6px 4px;
    color: #8b929b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.rc-td {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 42px;
    padding: 4px 6px;
    border-right: 1px solid #eef1f4;
    background: transparent;
}
.rc-td:last-child { border-right: 0; }
.rc-td > b {
    font-size: 12px;
    line-height: 1.2;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rc-td--name > b {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.rc-td input[type="text"],
.rc-td input[type="number"],
.rc-td input[type="datetime-local"],
.rc-td select {
    width: 100%;
    min-height: 32px;
    padding: 0 6px;
    border: 1px solid #d7dde5;
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
}
.rc-td input[type="datetime-local"] { font-size: 11px; padding: 0 3px; }
.rc-td--num {
    align-items: center;
    text-align: center;
}
.rc-td--num input { text-align: center; font-weight: 700; }
.rc-td--num small,
.rc-td--finish small,
.rc-td--facts em {
    color: #8a9199;
    font-size: 9px;
    font-style: normal;
    font-weight: 650;
}
.rc-td--finish b.is-done { color: #047857; }
.rc-td--facts { align-items: stretch; }
.rc-td--setupter .rc-crew__add {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
}
.rc-td--actions {
    align-items: center;
    border-right: 0;
}
.rc-card {
    border-radius: 12px;
}
.rc-card__head {
    padding: 10px 14px 8px 16px;
    grid-template-columns: 48px minmax(140px, 1fr) minmax(160px, 240px);
    gap: 10px 12px;
}
.rc-card__id {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}
.rc-card__id strong { font-size: 18px; }
.rc-card__meta h3 { font-size: 15px; }
.rc-card__crew { padding: 0 14px 8px 16px; }
.rc-pos-row {
    grid-template-columns: minmax(0, 1fr) 156px;
}
.rc-pos-row__body { padding: 8px 10px 10px 14px; }
.rc-num-stack { display: flex; gap: 4px; }
.rc-num-stack label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}
.rc-num-stack i {
    font-size: 8px;
    font-style: normal;
    color: #9aa1aa;
    font-weight: 700;
}
.rc-num-stack input { text-align: center; padding: 0 2px; }
.rc-setup-hint {
    font-size: 10px;
    font-weight: 650;
    color: #8a9199;
}
.rc-setup-hint--pending { color: #9a6700; }
.rc-setup-hint--in_progress { color: #1d4ed8; }
.rc-setup-hint--done { color: #047857; }

.rc-charts {
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 10px 12px;
    border-left: 1px solid #eef1f4;
    background: linear-gradient(180deg, #fbfcfd, #f5f7fa);
}
.rc-charts__bars { display: grid; gap: 5px; }
.rc-charts__bars > div {
    position: relative;
    height: 16px;
    border-radius: 6px;
    background: #e8ecf1;
    overflow: hidden;
}
.rc-charts__bars > div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w, 0%);
    border-radius: 6px;
}
.rc-charts__bars .is-setup::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.rc-charts__bars .is-work::before,
.rc-charts__bars .is-run::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.rc-charts__bars .is-incident::before { background: linear-gradient(90deg, #dc2626, #f87171); }
.rc-charts__bars .is-idle::before { background: linear-gradient(90deg, #64748b, #94a3b8); }
.rc-charts__bars span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    height: 100%;
    padding: 0 8px;
    align-items: center;
    color: #334155;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.rc-picker { padding: 0 26px 12px; display: grid; gap: 10px; }
.rc-picker input[type="search"] {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #d7dde5;
    border-radius: 10px;
    font-size: 14px;
}
.rc-picker__list {
    display: grid;
    gap: 4px;
    max-height: 320px;
    overflow: auto;
    padding-right: 4px;
}
.rc-picker__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}
.rc-picker__item:hover { background: #f3f6f9; }
.rc-picker__item:has(input:checked) {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.rc-picker__item input { margin: 0; }
.rc-picker__item .rc-person__avatar { width: 32px; height: 32px; font-size: 11px; }
.rc-picker__item.is-hidden { display: none; }
.rc-picker__item.is-disabled {
    opacity: .45;
    pointer-events: none;
}
.rc-picker__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.rc-picker__name {
    font-size: 13px;
    font-weight: 650;
    color: #111827;
}
.rc-picker__meta {
    color: #6b7280;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-field--plan input {
    text-align: center;
    font-weight: 700;
}
.rc-field--num > em {
    color: #6b7280;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}
.field-hint {
    display: block;
    margin-top: 4px;
    color: #8a9199;
    font-size: 11px;
    line-height: 1.35;
}

@media (max-width: 1400px) {
    .rc-pos-table__head,
    .rc-pos-table__row {
        grid-template-columns: 56px minmax(90px, 1fr) minmax(100px, 1fr) 52px 58px 78px 78px 48px 108px 108px minmax(120px, 1fr);
    }
    .rc-pos-table--manage .rc-pos-table__head,
    .rc-pos-table--manage .rc-pos-table__row {
        grid-template-columns: 56px minmax(90px, 1fr) minmax(100px, 1fr) 52px 58px 78px 78px 48px 108px 108px minmax(120px, 1fr) 48px;
    }
}
@media (max-width: 1100px) {
    .rc-card__head { grid-template-columns: 48px 1fr; }
    .rc-card__progress { grid-column: 1 / -1; }
    .rc-pos-row { grid-template-columns: 1fr; }
    .rc-charts { border-left: 0; border-top: 1px solid #eef1f4; }
    .rc-pos-table__head { display: none; }
    .rc-pos-table__row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .rc-td {
        border-right: 0;
        border-bottom: 1px solid #eef1f4;
    }
    .rc-td::before {
        content: attr(data-col);
        color: #8b929b;
        font-size: 8px;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .rc-td[data-col="mk"]::before { content: "МК"; }
    .rc-td[data-col="name"]::before { content: "Наименование"; }
    .rc-td[data-col="setup"]::before { content: "Установ"; }
    .rc-td[data-col="norm"]::before { content: "Норма"; }
    .rc-td[data-col="plan"]::before { content: "План"; }
    .rc-td[data-col="fact"]::before { content: "Факт"; }
    .rc-td[data-col="scrap"]::before { content: "Брак"; }
    .rc-td[data-col="mv"]::before { content: "МВ"; }
    .rc-td[data-col="start"]::before { content: "Начало"; }
    .rc-td[data-col="finish"]::before { content: "Окончание"; }
    .rc-td[data-col="setupter"]::before { content: "Наладчик"; }
    .rc-td--name,
    .rc-td--setupter { grid-column: span 2; }
}

/* ===== ???????????????????????????? ???????? ???????? ??????? ?????????????????????????????????? ????????????????????????????? ===== */
.rcm-list { display: grid; gap: 14px; }
.rcm-card {
    --rcm-accent: #6b7280;
    position: relative;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
}
.rcm-card::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--rcm-accent);
    opacity: .85;
}
.rcm-card--free { --rcm-accent: #94a3b8; }
.rcm-card--idle { --rcm-accent: #64748b; }
.rcm-card--setup,
.rcm-card--planned { --rcm-accent: #d97706; }
.rcm-card--progress { --rcm-accent: #16a34a; }
.rcm-card--done { --rcm-accent: #059669; }
.rcm-card--incident { --rcm-accent: #dc2626; }

.rcm-card__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px 10px 18px;
    border-bottom: 0;
    background: #fff;
}
.rcm-card__id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 44px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    border: 0;
    box-shadow: none;
    box-sizing: border-box;
    white-space: nowrap;
    line-height: 1;
}
.rcm-card__id-mark,
.rcm-card__id > span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    color: rgba(255, 255, 255, .55);
    line-height: 1;
}
.rcm-card__id strong {
    font-size: 16px;
    letter-spacing: -.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #fff;
}
.rcm-card__title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -.01em;
    color: #0f172a;
}
.settings-block {
    margin-top: 18px;
    padding: 16px 18px 16px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    background: #f8fafc;
}
.settings-block__head {
    display: grid;
    gap: 3px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.settings-block__head b {
    font-size: 13px;
    color: #111827;
}
.settings-block__head small {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
}
.settings-block .form-grid {
    margin: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.settings-block .form-grid label {
    min-width: 0;
}
.settings-block .form-grid input:not([type="checkbox"]):not([type="radio"]),
.settings-block .form-grid select {
    width: 100%;
    box-sizing: border-box;
}
.settings-block .switch-list {
    margin: 0;
}
@media (max-width: 720px) {
    .settings-block .form-grid { grid-template-columns: 1fr; }
}
.tablet-station-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #ecfdf5, #f0fdf4);
}
.tablet-station-banner small {
  display: block;
  color: #047857;
  font-size: 11px;
  margin-bottom: 2px;
}
.tablet-station-banner strong {
  display: block;
  font-size: 16px;
  color: #065f46;
}
.tablet-station-banner.is-bound {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .18);
}
.ops-machine-switch {
  margin: 0 0 16px;
  padding: 14px 16px 16px;
  border-radius: 16px;
  border: 1px solid #dbe4ee;
  background: #fff;
}
.ops-machine-switch__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ops-machine-switch__head small {
  display: block;
  color: #64748b;
  font-size: 11px;
}
.ops-machine-switch__head strong {
  font-size: 15px;
  color: #0f172a;
}
.ops-machine-switch__chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ops-machine-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.ops-machine-chip:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}
.ops-machine-chip.is-active {
  border-color: var(--accent-dark);
  background: linear-gradient(180deg, #f0fdfa, #ecfdf5);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, .15);
}
.ops-machine-chip.is-wait {
  opacity: .72;
}
.ops-machine-chip__num {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.ops-machine-chip.is-active .ops-machine-chip__num {
  background: var(--accent-dark);
}
.ops-machine-chip__body {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.ops-machine-chip__body b {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ops-machine-chip__body em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}
.ops-machine-picker {
  margin-bottom: 18px;
}
.ops-machine-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--panel-pad-x, 22px) 18px;
}
.ops-machine-pick {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f8fafc);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.ops-machine-pick:hover {
  border-color: var(--accent-dark);
  transform: translateY(-2px);
}
.ops-machine-pick.is-wait {
  opacity: .75;
}
.ops-machine-pick__num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
}
.ops-machine-pick strong {
  font-size: 17px;
}
.ops-machine-pick small,
.ops-machine-pick em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}
.ops-machine-pick .button {
  justify-self: stretch;
  margin-top: 6px;
  text-align: center;
}
.prod-card.is-station-focus {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}
@media (max-width: 1100px) {
  .ops-machine-switch__chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ops-machine-switch__chips,
  .ops-machine-picker__grid { grid-template-columns: 1fr; }
  .ops-machine-switch__head { flex-direction: column; align-items: stretch; }
}
/* ????????????? ???????? ???????????????????? */
.shop-crew-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.shop-crew-filters__field {
  display: grid;
  gap: 4px;
  min-width: 140px;
}
.shop-crew-filters__field span {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.shop-crew-filters__field input,
.shop-crew-filters__field select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  background: #fff;
}
.shop-crew-dash {
  margin-bottom: 16px;
}
.shop-crew-dash__stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.shop-crew-alert {
  margin-bottom: 16px;
  border-color: #fecaca;
  background: #fff7f7;
}
.shop-crew-alert .panel__header {
  background: transparent;
  border-bottom-color: #fecaca;
}
.shop-crew-alert__list {
  list-style: none;
  margin: 0;
  padding: 0 22px 18px;
  display: grid;
  gap: 8px;
}
.shop-crew-alert__list li {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
}
.shop-crew-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}
.shop-crew-people {
  list-style: none;
  margin: 0;
  padding: 0 12px 16px;
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}
.shop-crew-people li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eef2f6;
  background: #f8fafc;
}
.shop-crew-people b {
  font-size: 14px;
  font-weight: 600;
}
.shop-crew-people__mark {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.shop-crew-people__mark--op {
  background: #eff6ff;
  color: #1d4ed8;
}
.shop-crew-people__mark--setup {
  background: #e6f7f4;
  color: #c2410c;
}
.shop-crew-block {
  margin-bottom: 16px;
}
.shop-crew-replace-form {
  padding: 0 22px 8px;
}
.shop-crew-table-wrap {
  padding: 0 0 8px;
}
.shop-crew-table-wrap .data-table {
  margin: 0;
}
.shop-crew-load-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.shop-crew-load-filters label {
  display: grid;
  gap: 3px;
}
.shop-crew-load-filters label span {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
}
.shop-crew-load-filters input {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: #fff;
}
@media (max-width: 960px) {
  .shop-crew-grid { grid-template-columns: 1fr; }
  .shop-crew-dash__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shop-crew-dash__stats { grid-template-columns: 1fr 1fr; }
  .shop-crew-filters { width: 100%; }
  .panel__header .shop-crew-load-filters {
    width: 100%;
  }
}

.pin-issued__grid--simple {
  grid-template-columns: minmax(140px, 200px) 1fr;
}

/* PIN-????????????????????: ???????????????? ????????????????????? ???????? ?????????????????????????? */
.tablet-pin-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: #0f172a;
  background:
    linear-gradient(148deg, #0a1f24 0%, #123a40 44%, #f4f6f8 44.05%, #f7f8fa 100%);
}
.tablet-pin {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 28px 18px 40px;
  box-sizing: border-box;
}
.tablet-pin__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}
.tablet-pin__brand b {
  font-weight: 800;
}
.tablet-pin__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(26, 168, 150, .35);
}
.tablet-pin__card {
  width: min(100%, 560px);
  padding: 36px 36px 32px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
  display: grid;
  gap: 0;
  animation: tabletPinIn .45s ease both;
}
@keyframes tabletPinIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.tablet-pin__eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.tablet-pin__title {
  margin: 0;
  display: grid;
  gap: 4px;
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0f172a;
}
.tablet-pin__num {
  display: block;
  font-size: clamp(30px, 4vw, 36px);
  line-height: 1.05;
  color: var(--accent);
}
.tablet-pin__name {
  display: block;
  font-size: clamp(20px, 2.8vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.tablet-pin__area {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}
.tablet-pin__lead {
  margin: 18px 0 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.45;
}
.tablet-pin__lead code {
  font-size: 12px;
  word-break: break-all;
}
.tablet-pin__job {
  margin-top: 22px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #f4f6f8;
  border: 1px solid var(--line);
  animation: tabletPinIn .55s ease .05s both;
}
.tablet-pin__job--empty {
  background: #f8fafc;
  border-color: var(--line);
}
.tablet-pin__job--empty p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}
.tablet-pin__job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tablet-pin__job-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #64748b;
}
.tablet-pin__job-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.tablet-pin__job-badge.is-ready {
  background: transparent;
  color: #16a34a;
  padding-left: 0;
}
.tablet-pin__job-badge.is-setup {
  background: #fff7ed;
  color: #c47a14;
}
.tablet-pin__job-badge.is-idle {
  background: #e2e8f0;
  color: #475569;
}
.tablet-pin__job-title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: #0f172a;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.tablet-pin__job-article {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}
.tablet-pin__job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  margin-top: 16px;
}
.tablet-pin__job-grid > div {
  min-width: 0;
}
.tablet-pin__job-grid span {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.tablet-pin__job-grid b {
  display: block;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  overflow-wrap: break-word;
}
.tablet-pin__progress {
  margin-top: 16px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .25);
  overflow: hidden;
}
.tablet-pin__progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .4s ease;
}
.tablet-pin__progress-label {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.tablet-pin__error {
  margin-top: 18px;
}
.tablet-pin__field {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tablet-pin__field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 64px;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .35em;
  text-align: center;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tablet-pin__field input::placeholder {
  letter-spacing: .35em;
  color: #94a3b8;
}
.tablet-pin__field input:focus {
  outline: none;
  border-color: #0d9488;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .15);
}
.tablet-pin__submit {
  margin-top: 18px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(26, 168, 150, .28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.tablet-pin__submit:hover {
  filter: brightness(1.05);
  background: #159987;
  box-shadow: 0 14px 32px rgba(26, 168, 150, .34);
}
.tablet-pin__submit:active {
  transform: translateY(1px);
}
@media (max-width: 720px) {
  .tablet-pin__card { width: min(100%, 560px); padding: 32px 24px 28px; }
  .tablet-pin__job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .tablet-pin__card { padding: 28px 18px 24px; border-radius: 18px; }
  .tablet-pin__num { font-size: 26px; }
  .tablet-pin__name { font-size: 18px; }
  .tablet-pin__job { padding: 14px; }
  .tablet-pin__job-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tablet-pin__field input { min-height: 58px; font-size: 24px; }
}

/* ?????????? ?????????? ?????????? PIN */
.tablet-handover-page,
.tablet-done-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: #0f172a;
  background:
    linear-gradient(148deg, #0a1f24 0%, #123a40 38%, #f4f6f8 38.05%, #f7f8fa 100%);
}
.tablet-ho {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px 16px 36px;
  box-sizing: border-box;
}
.tablet-ho__brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  animation: tabletHoIn .4s ease both;
}
.tablet-ho__brand b { font-weight: 800; }
.tablet-ho__panel {
  width: min(100%, 640px);
  padding: 28px 28px 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
  animation: tabletHoIn .5s ease .04s both;
}
@keyframes tabletHoIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.tablet-ho__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.tablet-ho__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.tablet-ho__title {
  margin: 0;
  display: grid;
  gap: 4px;
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -.02em;
}
.tablet-ho__num {
  display: block;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.05;
  color: var(--accent);
}
.tablet-ho__name {
  display: block;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.tablet-ho__area,
.tablet-ho__operator {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}
.tablet-ho__operator { margin-top: 4px; font-weight: 600; color: #475569; }
.tablet-ho__logout { margin: 0; }
.tablet-ho__ghost {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tablet-ho__ghost:active { transform: scale(.98); }
.tablet-ho__error { margin: 0; }
.tablet-ho__job {
  padding: 16px;
  border-radius: 16px;
  background: #f4f6f8;
  border: 1px solid var(--line);
  animation: tabletHoIn .55s ease .08s both;
}
.tablet-ho__job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tablet-ho__job-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #94a3b8;
}
.tablet-ho__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tablet-ho__badge.is-ready { background: #d1fae5; color: #065f46; }
.tablet-ho__badge.is-setup { background: #ffedd5; color: #9a3412; }
.tablet-ho__badge.is-idle { background: #e2e8f0; color: #475569; }
.tablet-ho__job-title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.tablet-ho__job-article {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}
.tablet-ho__stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.tablet-ho__stats > div {
  min-width: 0;
}
.tablet-ho__stats span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.tablet-ho__stats b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.tablet-ho__progress {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.tablet-ho__progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f8f7e, #1aa896);
  transition: width .45s ease;
}
.tablet-ho__progress-label {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.tablet-ho__empty,
.tablet-ho__state {
  display: grid;
  gap: 12px;
}
.tablet-ho__empty h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.tablet-ho__empty p,
.tablet-ho__hint {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.45;
}
.tablet-ho__actions { margin: 0; display: grid; gap: 10px; }
.tablet-ho__form {
  display: grid;
  gap: 14px;
  animation: tabletHoIn .55s ease .12s both;
}
.tablet-ho__qty {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tablet-ho__form label,
.tablet-ho__note {
  display: grid;
  gap: 7px;
  color: #555c65;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tablet-ho__form input {
  width: 100%;
  min-height: 64px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
}
.tablet-ho__form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 168, 150, .18);
}
.tablet-ho__note input {
  min-height: 52px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.tablet-ho__submit {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #1db8a4, #149687);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 150, 135, .28);
}
.tablet-ho__submit:hover { filter: brightness(1.03); }
.tablet-ho__submit:active { transform: translateY(1px) scale(.99); }
.tablet-ho__submit--secondary {
  background: #fff;
  color: #334155;
  border: 1px solid var(--line);
  box-shadow: none;
}
.tablet-done {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px 16px;
  box-sizing: border-box;
}
.tablet-done__brand {
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  animation: tabletHoIn .4s ease both;
}
.tablet-done__brand b { font-weight: 800; }
.tablet-done__panel {
  width: min(100%, 480px);
  padding: 36px 28px 28px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  animation: tabletHoIn .5s ease .05s both;
}
.tablet-done__check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  margin-bottom: 6px;
  animation: tabletDonePop .55s cubic-bezier(.2, .9, .3, 1.2) both;
}
.tablet-done__check span {
  width: 28px;
  height: 14px;
  border-left: 4px solid #059669;
  border-bottom: 4px solid #059669;
  transform: rotate(-45deg) translate(2px, -2px);
}
@keyframes tabletDonePop {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: none; }
}
.tablet-done__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #059669;
}
.tablet-done h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0f172a;
  line-height: 1.2;
}
.tablet-done__machine {
  margin: 0;
  color: #64748b;
  font-size: 15px;
}
.tablet-done__stats {
  width: 100%;
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}
.tablet-done__stats > div {
  padding: 12px 10px;
  border-radius: 14px;
  background: #f4f6f8;
  border: 1px solid var(--line);
}
.tablet-done__stats span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}
.tablet-done__stats b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}
.tablet-done__hint {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 13px;
}
.tablet-done__btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(180deg, #1db8a4, #149687);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(20, 150, 135, .28);
}
@media (max-width: 640px) {
  .tablet-ho__panel { padding: 22px 16px 20px; border-radius: 18px; }
  .tablet-ho__head { flex-direction: column; }
  .tablet-ho__stats { grid-template-columns: 1fr 1fr; }
  .tablet-ho__qty { grid-template-columns: 1fr; }
  .tablet-ho__form input { min-height: 58px; font-size: 24px; }
}
.pin-station-links {
  display: grid;
  gap: 0;
  max-height: 520px;
  overflow: auto;
}
.pin-station-links__row small {
  display: block;
  margin: 2px 0 4px;
}
.pin-station-links__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line, #e5e7eb);
}
.pin-station-links__row:first-child { border-top: 0; }
.pin-station-links__row b {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}
.pin-station-links__row code {
  display: block;
  font-size: 11px;
  word-break: break-all;
  color: #64748b;
}
.pin-station-links__row > div:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .tablet-station-banner,
  .pin-station-links__row {
    flex-direction: column;
    align-items: stretch;
  }
}
.pin-howto { margin-bottom: 16px; }
.pin-howto__list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0 22px 8px 40px;
}
.pin-howto__list li {
    display: grid;
    gap: 2px;
}
.pin-howto__list b {
    font-size: 13px;
    color: #0f172a;
}
.pin-howto__list span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}
.pin-howto__url {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 8px 22px 20px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: 13px;
}
.pin-howto__url code {
    flex: 1 1 220px;
    word-break: break-all;
    font-size: 12px;
}
.tablet-kiosk__steps {
    margin: 0;
    padding-left: 18px;
    color: rgba(255,255,255,.82);
    font-size: 14px;
    line-height: 1.55;
    display: grid;
    gap: 6px;
}
.tablet-kiosk__card label select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    background: #fff;
    font: inherit;
}
.pin-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
}
.pin-layout > .panel {
    min-width: 0;
    overflow: hidden;
}
.pin-issue-form,
.pin-layout .empty-state {
    padding: 0 var(--panel-pad-x, 22px) 20px;
}
.pin-issue-form .form-actions {
    justify-content: flex-start;
    margin-top: 14px;
    padding: 14px 0 0;
    border: 0;
}
.pin-issue-form__field {
    display: grid;
    gap: 7px;
}
.pin-issue-form__field > span {
    color: #555c65;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.pin-issue-form__field select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line, #d8dee7);
    border-radius: 10px;
    background: #fff;
    font: inherit;
}
.pin-issue-form__meta {
    margin-top: 10px;
    color: #6b7280;
    font-size: 12px;
}
.pin-issued {
    margin-bottom: 16px;
    border-color: #a7f3d0;
    background: #ecfdf5;
    padding: 16px 18px 18px;
}
.pin-issued__head {
    display: grid;
    gap: 2px;
    margin-bottom: 12px;
}
.pin-issued__head small { color: #047857; }
.pin-issued__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.pin-issued__grid > div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .75);
}
.pin-issued__grid span {
    font-size: 11px;
    color: #065f46;
    font-weight: 700;
}
.pin-issued__grid strong {
    font-size: 28px;
    letter-spacing: .08em;
    color: #064e3b;
}
.pin-issued__grid code {
    font-size: 12px;
    word-break: break-all;
}
.pin-machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.pin-machine-card {
    display: grid;
    gap: 4px;
    padding: 12px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.pin-machine-card:hover {
    background: #fff;
    border-color: #cbd5e1;
}
.pin-machine-card b {
    font-size: 13px;
    color: #0f172a;
}
.pin-machine-card small {
    color: #6b7280;
    font-size: 11px;
    line-height: 1.3;
}
@media (max-width: 900px) {
    .pin-layout { grid-template-columns: 1fr; }
    .pin-issued__grid { grid-template-columns: 1fr; }
}
.global-search {
    position: relative;
    min-width: 220px;
}
.global-search input {
    width: 100%;
    border: 1px solid #d7dce3;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 13px;
    background: #fff;
}
.global-search__results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 40;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
    max-height: 320px;
    overflow: auto;
    padding: 6px;
}
.global-search__item {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}
.global-search__item:hover { background: #f3f5f7; }
.global-search__item small { color: #6b7280; }
.global-search__empty { padding: 10px; color: #6b7280; font-size: 13px; }
.whats-new {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}
.whats-new button {
    margin-left: auto;
    border: 0;
    background: #1d4ed8;
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}
.pl-deadline { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pl-deadline--overdue, .pl-deadline--hot { background: #fee4e2; color: #912018; }
.pl-deadline--warn { background: #d5f3ee; color: #9a3412; }
.pl-deadline--ok { background: #d1fae5; color: #065f46; }
.pl-timeline { margin: 8px 0 0; padding-left: 18px; }
.pl-suggest { font-size: 11px; color: #475569; }
.pl-suggest em { font-style: normal; margin-left: 4px; font-weight: 700; }
.mon-extra-panel,
.mon-alert-panel {
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.mon-page .mon-extra-panel,
.mon-page .mon-alert-panel {
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.mon-alert-panel {
    border-color: #f6d9a8;
    background: #fffbeb;
}
.mon-alert-panel .panel__header {
    border-bottom-color: #f3e0b8;
    background: transparent;
}
.mon-view-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}
.mon-view-tabs .button.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}
.mon-extra-body {
    padding: 16px 18px 18px;
}
.mon-map-form {
    margin-top: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
}
.mon-map-form .form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}
@media (max-width: 720px) {
    .mon-map-form { grid-template-columns: 1fr; }
}
.mon-floor-map {
    position: relative;
    min-height: 360px;
    background:
        linear-gradient(#eef2f7 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, #eef2f7 1px, transparent 1px) 0 0 / 40px 40px,
        #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
.mon-floor-map .empty-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 24px;
    text-align: center;
}
.mon-floor-map__item {
    position: absolute;
    transform: translate(-50%, -50%);
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px 4px 4px;
    border-radius: 10px;
    white-space: nowrap;
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mon-timeline-list { display: grid; gap: 8px; }
.mon-timeline-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1.4fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
}
.mon-timeline-row b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mon-timeline-row span {
    color: #64748b;
    font-size: 12px;
}
@media (max-width: 720px) {
    .mon-timeline-row {
        grid-template-columns: 1fr auto;
    }
    .mon-timeline-row span { grid-column: 1 / -1; }
}
.roles-matrix { overflow: auto; max-width: 100%; }
.roles-matrix table { min-width: 720px; font-size: 12px; }
.roles-matrix td.on { background: #d1fae5; text-align: center; }
.qc-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.director-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 var(--panel-pad-x, 22px) 16px;
}
.director-kpis article {
    min-width: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}
.director-kpis small {
    display: block;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.3;
}
.director-kpis b {
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -.02em;
    word-break: break-word;
}
@media (max-width: 1100px) {
    .director-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .global-search { min-width: 160px; }
}
@media (max-width: 640px) {
    .director-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rc-dash__tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.rc-live-pill {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-dark);
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 999px;
}
.rc-live-pill.is-loading { opacity: .55; }
.rc-live-pill.is-error { color: #b42318; background: #fee4e2; }
.rc-next-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.panel__header + .rc-next-actions {
    padding-left: var(--panel-pad-x);
    padding-right: var(--panel-pad-x);
    padding-bottom: 16px;
}
.rc-next-actions__item {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 10px;
    background: #f3f5f7;
    color: #243041;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
a.rc-next-actions__item:hover { background: #e8eef5; }
.rc-idle {
    display: grid;
    gap: 2px;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f6f7f9;
    font-size: 12px;
}
.rc-idle b { font-size: 12px; }
.rc-idle--incident { background: #fee4e2; color: #912018; }
.rc-idle--wait_setup,
.rc-idle--setup_progress { background: #eff4ff; color: #1d4ed8; }
.rc-idle--no_ops { background: #e6f7f4; color: #9a3412; }
.rc-idle--online_idle { background: #fef3c7; color: #92400e; }
.rc-idle--free { background: #f3f4f6; color: #4b5563; }
.rc-idle--working { background: #d1fae5; color: #065f46; }
.rc-idle--done { background: #e0e7ff; color: #3730a3; }
.rc-next-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #5b6573;
}
.rc-cnc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.rc-cnc.is-online { color: var(--accent-dark); background: #d1fae5; }
.rc-cnc.is-stale { color: #8a4b00; background: #ffe8bf; }
.rc-cnc.is-offline { color: #5f6670; background: #eef0f2; }
.empty-state--rich {
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 28px 22px;
    text-align: center;
}
.empty-state--rich b { font-size: 16px; color: #151a21; }
.empty-state--rich p { margin: 0 auto; color: #5b6573; max-width: 42ch; }
.empty-state--rich .heading-actions,
.empty-state--rich .button {
    justify-self: center;
}
.notify-toggle.has-unread [data-notify-badge] {
    transition: transform .18s ease, background-color .25s ease;
}
.notify-toggle.has-unread.is-bump [data-notify-badge] {
    transform: scale(1.18);
}
.rcm-card__title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.rcm-card__title-row h3 {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rcm-card__title-row .rc-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .01em;
    text-transform: none;
    border: 1px solid transparent;
}
.rcm-card__title-row .rc-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.rcm-card--setup .rc-status--setup,
.rcm-card--planned .rc-status--planned {
    color: #92400e;
    background: #fff7ed;
    border-color: #fed7aa;
}
.rcm-card--idle .rc-status--idle {
    color: #334155;
    background: #e2e8f0;
    border-color: #cbd5e1;
}
.rcm-card--progress .rc-status--progress {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}
.rcm-card--done .rc-status--done {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.rcm-card--incident .rc-status--incident {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}
.rcm-card--free .rc-status--free {
    color: #475569;
    background: #f8fafc;
    border-color: #e2e8f0;
}
.rcm-card__title small {
    display: block;
    margin-top: 3px;
    color: #7b8491;
    font-size: 11px;
}
.rcm-clear {
    justify-self: end;
    align-self: start;
    white-space: nowrap;
}
.rcm-clear-slot { width: 1px; height: 1px; }

.rcm-crew {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 16px 12px 18px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
}
.rcm-aux-strip {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 16px 10px 18px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 12px;
    background: rgba(255,255,255,.88);
    font-size: 12px;
}
.rcm-aux-strip > span {
    color: #8b929b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.rcm-aux-strip > b { font-size: 13px; color: #111827; }
.rcm-aux-strip > em {
    color: #6b7280;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
}
.rcm-crew--under-times,
.rcm-crew--under-cells {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    padding: 10px;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.rcm-crew--under-chart {
    margin: 10px 0 0;
    padding: 10px;
    background: rgba(248, 250, 252, .9);
}
.rcm-crew__label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .01em;
    text-transform: none;
}
.rcm-crew__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.rcm-empty { color: #9aa1aa; font-size: 12px; font-style: normal; }
.rcm-empty-pos {
    padding: 10px 0 12px;
    color: #6b7280;
    font-size: 13px;
}
.rcm-pos--empty {
    min-width: 0;
    max-width: 100%;
}
.rcm-pos__grid--empty {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.rcm-pos__grid--empty > .rcm-chart {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.rcm-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 3px 28px 3px 3px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    box-sizing: border-box;
}
.rcm-chip__slot {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-left: 2px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    flex: 0 0 auto;
}
.rcm-chip__ava {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    background: #64748b;
}
.rcm-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 650;
}
.rcm-chip__x {
    position: absolute;
    top: -4px;
    right: -2px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}
.rcm-chip__x:hover { background: #b91c1c; }
.rcm-chip--steel .rcm-chip__ava { background: #475569; }
.rcm-chip--ocean .rcm-chip__ava { background: #2563eb; }
.rcm-chip--forest .rcm-chip__ava { background: var(--accent-dark); }
.rcm-chip--amber .rcm-chip__ava { background: var(--accent-dark); }
.rcm-chip--rose .rcm-chip__ava { background: #be123c; }
.rcm-chip--slate .rcm-chip__ava { background: #334155; }
.rcm-chip--teal .rcm-chip__ava { background: #0e7490; }
.rcm-chip--schedule {
    padding-right: 10px;
    border-style: dashed;
}
.rcm-chip__mark {
    flex: 0 0 auto;
    margin-right: 4px;
    color: #15803d;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.rc-picker__item.is-on-machine {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.rcm-add {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px dashed #c9d0d8;
    border-radius: 999px;
    background: transparent;
    color: #374151;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
.rcm-add:hover { border-color: #94a3b8; background: #f8fafc; }

.rcm-pos { padding: 4px 16px 14px 18px; min-width: 0; }
.rcm-pos__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
}
.shift-rc-form .shift-rc-row.rcm-pos.is-primary {
    display: block;
    width: 100%;
    min-width: 0;
}
.shift-rc-form .shift-rc-row.rcm-pos.is-primary .rcm-pos__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
    width: 100%;
}
.shift-rc-form .shift-rc-row.rcm-pos.is-primary .rcm-cells {
    width: 100%;
    min-width: 0;
}
.shift-rc-form .shift-rc-row.rcm-pos.is-primary .rcm-chart,
.shift-rc-form .shift-rc-row.rcm-pos.is-primary .rcm-crew--under-cells {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}
.rcm-pos__grid > .rcm-cells,
.rcm-pos__grid > .rcm-chart,
.rcm-pos__grid > .rcm-crew--under-cells {
    width: 100%;
    min-width: 0;
}
.rcm-cells {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.rcm-cells__row {
    display: grid;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
}
.rcm-cells__row--1 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
}
.rcm-cells__row--2 {
    grid-template-columns: repeat(10, minmax(0, 1fr));
}
.rcm-cells__row > .rcm-cell {
    min-width: 0;
}
.rcm-cells__row--2 > .rcm-cell {
    overflow: hidden;
}
.rcm-cells__row--1 .rcm-cell {
    min-height: 0;
    padding: 4px 6px;
    border-radius: 8px;
    gap: 2px;
}
.rcm-cells__row--1 .rcm-cell > span {
    font-size: 9px;
    line-height: 1.2;
}
.rcm-cells__row--1 .rcm-cell > b {
    font-size: 11px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
}
.rcm-cells__row--2 .rcm-cell {
    min-height: 64px;
}
.rcm-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 8px;
    align-items: start;
    min-width: 0;
}
.rcm-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 0;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
    box-sizing: border-box;
    text-align: center;
}
.rcm-cell--editable {
    position: relative;
    padding-top: 12px;
    padding-right: 28px;
}
.rcm-cell__edit {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 118, 110, .28);
    border-radius: 5px;
    background: #fff;
    color: #0f766e;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}
.rcm-cell__edit:hover {
    background: #f0fdfa;
    border-color: #0f766e;
}
.rcm-edit-modal { display: grid; gap: 14px; }
.rcm-edit-modal__meta {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}
.rcm-edit-modal__field { display: grid; gap: 6px; margin: 0; }
.rcm-edit-modal__field > span {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rcm-edit-modal__field input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d5dbe3;
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
}
.rcm-edit-modal__hint { margin: 0; font-size: 12.5px; color: #64748b; line-height: 1.4; }
.rcm-edit-modal__modes {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 8px;
}
.rcm-edit-modal__modes legend {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rcm-edit-modal__mode {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 0;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.rcm-edit-modal__mode:has(input:checked) {
    border-color: rgba(15, 118, 110, .45);
    background: #f0fdfa;
}
.rcm-edit-modal__mode input { margin-top: 3px; }
.rcm-edit-modal__mode b { display: block; font-size: 14px; color: #0f172a; }
.rcm-edit-modal__mode small { display: block; margin-top: 2px; font-size: 12px; color: #64748b; }
.rcm-cell--wide { grid-column: 1 / -1; }
.rcm-cell > span {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: none;
    line-height: 1.25;
    width: 100%;
}
.rcm-cell > b {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    width: 100%;
    text-align: center;
}
.rcm-cells__row--1 .rcm-cell > b {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
}
.rcm-cell--wide > b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.rcm-cell input[type="number"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 30px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    box-sizing: border-box;
    text-align: center;
}
.rcm-fact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.rcm-fact input {
    flex: 1 1 64px;
    min-width: 0;
    text-align: center;
}
.rcm-cell em {
    display: block;
    margin: 0;
    color: #6b7280;
    font-size: 10px;
    line-height: 1.35;
    font-style: normal;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}
.rcm-day-sum {
    margin-top: 2px;
    padding-top: 4px;
    border-top: 1px solid rgba(15, 23, 42, .06);
    color: #64748b;
}

.rcm-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 8px;
    align-content: start;
    min-width: 0;
    max-width: 100%;
}
.rcm-times > .rcm-cell {
    width: 100%;
}
.rcm-times [data-shift-rc-eta].is-done,
.rcm-cells [data-shift-rc-eta].is-done {
    color: #047857;
}
.rcm-chart {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.rcm-gantt {
    --rcm-label-w: 74px;
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 10px 8px;
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    background: #fbfcfd;
    overflow: hidden;
}
.rcm-gantt__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    min-width: 0;
}
.rcm-gantt__head strong {
    font-size: 10px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #7b8694;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.rcm-gantt__head span,
.rcm-gantt__clock {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #495466;
    letter-spacing: .02em;
}
.rcm-gantt__axis {
    position: relative;
    height: 12px;
    margin-left: var(--rcm-label-w);
    margin-bottom: 3px;
    overflow: hidden;
}
.rcm-gantt__axis span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    color: #9aa3af;
    font-size: 8px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    z-index: 1;
    white-space: nowrap;
}
.rcm-gantt__axis span:first-child {
    transform: translateX(0);
}
.rcm-gantt__axis span:last-child {
    transform: translateX(-100%);
}
.rcm-gantt__body {
    position: relative;
    isolation: isolate;
}
.rcm-gantt__grid {
    position: absolute;
    inset: 0 0 0 var(--rcm-label-w);
    pointer-events: none;
    z-index: 0;
}
.rcm-gantt__grid i {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #edf1f6;
}
.rcm-gantt__now {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--rcm-label-w);
    width: 2px;
    background: #ea5455;
    box-shadow: 0 0 0 1px rgba(234, 84, 85, .16);
    z-index: 5;
    pointer-events: none;
    transform: translateX(-1px);
}
.rcm-gantt__now::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ea5455;
    transform: translateX(-50%);
}
.rcm-gantt__track {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: var(--rcm-label-w) minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
}
.rcm-gantt__track em {
    color: #7f8996;
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
}
.rcm-gantt__lane {
    position: relative;
    z-index: 2;
    height: 11px;
    border-radius: 4px;
    background: #f2f4f8;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #e7ebf1;
}
.rcm-gantt__lane b {
    position: absolute;
    z-index: 2;
    top: 1px;
    bottom: 1px;
    border-radius: 3px;
    transition: width .2s linear, left .2s linear;
}
.rcm-gantt__lane b.is-live {
    box-shadow: 0 0 0 1px rgba(255,255,255,.55) inset;
}
.rcm-gantt__lane b.is-planned { opacity: .42; }
.rcm-gantt__lane b.is-done { opacity: .95; }
.rcm-gantt__lane b.is-closed { opacity: .55; }
/* Работа=зелёный · наладка=янтарный · инцидент=красный · простой=серый */
.rcm-gantt__track--setup .rcm-gantt__lane b { background: linear-gradient(90deg, #fbbf24, #d97706); }
.rcm-gantt__track--setup .rcm-gantt__lane b.is-planned {
    background: linear-gradient(90deg, #fcd34d, #f59e0b);
    opacity: .75;
}
.rcm-gantt__track--setup .rcm-gantt__lane b.is-active {
    background: linear-gradient(90deg, #f59e0b, #b45309);
    opacity: .95;
}
.rcm-gantt__track--setup .rcm-gantt__lane b.is-done {
    background: linear-gradient(90deg, #fbbf24, #d97706);
    opacity: .95;
}
.rcm-gantt__track--work .rcm-gantt__lane b { background: linear-gradient(90deg, #4ade80, #16a34a); }
.rcm-gantt__track--work .rcm-gantt__lane b.is-planned {
    background: linear-gradient(90deg, #bbf7d0, #86efac);
}
.rcm-gantt__track--alarm .rcm-gantt__lane b { background: linear-gradient(90deg, #f87171, #dc2626); }
.rcm-gantt__track--incident .rcm-gantt__lane b { background: linear-gradient(90deg, #fb7185, #e11d48); }
.rcm-gantt__track--idle .rcm-gantt__lane b {
    background: repeating-linear-gradient(
        -45deg,
        rgba(100, 116, 139, .42),
        rgba(100, 116, 139, .42) 3px,
        rgba(100, 116, 139, .16) 3px,
        rgba(100, 116, 139, .16) 6px
    );
    opacity: .85;
    border-radius: 3px;
}
.rcm-gantt__legend {
    display: none;
}
.rcm-gantt__legend span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 999px;
    vertical-align: middle;
}
.rcm-gantt__legend .is-setup::before { background: #d97706; }
.rcm-gantt__legend .is-work::before { background: #16a34a; }
.rcm-gantt__legend .is-planned::before { background: #94a3b8; }
.rcm-gantt__legend .is-incident::before { background: #dc2626; }
.rcm-gantt__legend .is-idle::before {
    background: repeating-linear-gradient(-45deg, #64748b, #64748b 2px, #cbd5e1 2px, #cbd5e1 4px);
    border-radius: 2px;
}
.rcm-gantt__legend .is-now::before {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, .2);
}

.rcm-next {
    border-top: 1px solid rgba(15, 23, 42, .06);
    padding: 0 16px 12px 18px;
}
.rcm-next > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    padding: 10px 0 6px;
    color: #1e3a5f;
    font-size: 12px;
    font-weight: 700;
}
.rcm-next > summary::-webkit-details-marker { display: none; }
.rcm-next > summary b {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e7f1ff;
    color: #1d4ed8;
    font-size: 11px;
}
.rcm-next__list { display: grid; gap: 8px; padding-bottom: 4px; }
.rcm-next__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 12px;
    background: rgba(248, 250, 252, .9);
}
.rcm-next__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    font-size: 12px;
    color: #475569;
}
.rcm-next__tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: #e7f1ff;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.rcm-next__times {
    display: grid;
    gap: 2px;
    text-align: right;
    font-size: 11px;
    color: #64748b;
}
.rcm-next__times b { color: #0f172a; font-size: 12px; }

@media (max-width: 1200px) {
    .rcm-cells__row--1 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .rcm-cells__row--2 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
@media (max-width: 900px) {
    .rcm-card__head { grid-template-columns: auto minmax(0, 1fr); }
    .rcm-clear { grid-column: 1 / -1; justify-self: start; }
    .rcm-crew { grid-template-columns: 1fr; margin-right: 14px; }
    .rcm-crew--under-times,
    .rcm-crew--under-cells { grid-template-columns: 1fr; }
    .rcm-crew--under-chart { margin-right: 0; }
    .rcm-cells__row--1 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .rcm-cells__row--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .rcm-info,
    .rcm-times { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
    .rcm-next__item { grid-template-columns: 1fr; }
    .rcm-next__times { text-align: left; }
}

.profile-shift-panel .profile-shift-list {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}
.profile-shift-panel .panel__header {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.profile-shift-panel--flat > .panel__header {
    border-bottom: 0;
}
.profile-shift-panel .panel__header + .shift-block {
    margin-top: 0;
    padding-top: 0;
}
.profile-shift-links { display: none; }
.shift-block {
    margin: 16px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.panel__header + .shift-block {
    margin-top: 0;
}
.shift-block + .shift-block { margin-top: 0; }
.shift-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef0f2;
    background: #fafbfc;
}
.shift-block__head h3 {
    margin: 0 0 2px;
    font-size: 15px;
}
.shift-block__head p {
    margin: 0;
    color: #8a9199;
    font-size: 11px;
}
.shift-block__head b {
    color: var(--accent-dark, var(--accent-dark));
    font-size: 20px;
}
.shift-block .profile-shift-list {
    padding: 12px;
}

/* ?????????????????????????????????? ???????????????????????????? ???????? ???????????????????? ???? ????????????????????????? ????????????????????????????????? */
.psc {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(23, 27, 32, .03);
}
.psc--progress { border-color: #c8e0d2; }
.psc--planned { border-color: #ead9a8; }
.psc--done { border-color: #d7dbe0; }
.psc--free { border-color: #e4e7eb; }

.psc__head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f2;
    background: linear-gradient(180deg, #fbfcfd 0%, #f7f8fa 100%);
}
.psc__id {
    display: grid;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    color: #1f242b;
    background: #fff;
    border: 1px solid #e6e9ed;
    place-items: center;
    line-height: 1;
}
.psc__id span {
    display: block;
    color: #98a0a9;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.psc__id strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    font-weight: 800;
}
.psc__title { min-width: 0; }
.psc__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.psc__title h3 {
    margin: 0;
    color: #1c2128;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.psc__title small {
    display: block;
    margin-top: 4px;
    color: #8a9199;
    font-size: 11px;
    line-height: 1.3;
}
.psc__status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.psc__status--progress { color: #0f6b45; background: #e6f6ee; }
.psc__status--planned { color: #8a5a00; background: #fff3d6; }
.psc__status--done { color: #5b6570; background: #eef1f4; }
.psc__status--free { color: #5b6570; background: #eef1f4; }

.psc__body { padding: 12px 14px; }
.psc__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.psc__meta--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.psc__meta--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.psc__meta > div {
    min-width: 0;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.psc__meta span {
    display: block;
    margin-bottom: 4px;
    color: #8a9199;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.psc__meta b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #22272d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
}

.psc__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid #eef0f2;
    background: #fafbfc;
}
.psc__take,
.psc__complete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    margin: 0;
}
.psc__complete { flex: 1 1 auto; justify-content: flex-end; }
.psc__mv {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    color: #6d747d;
    font-size: 10px;
    font-weight: 700;
}
.psc__mv input {
    width: 96px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #fff;
    color: #22272d;
    font-size: 13px;
    font-weight: 600;
}
.psc__foot .button { min-height: 36px; }

@media (max-width: 720px) {
    .psc__head {
        grid-template-columns: 48px minmax(0, 1fr);
    }
    .psc__head > .button {
        grid-column: 1 / -1;
        justify-self: stretch;
        text-align: center;
    }
    .psc__meta { grid-template-columns: 1fr; }
    .psc__complete { justify-content: stretch; width: 100%; }
    .psc__complete .button,
    .psc__take .button { flex: 1 1 auto; }
    .psc__mv { flex: 1 1 96px; }
    .psc__mv input { width: 100%; }
}

/* legacy alias ??????? ???????? ?????????????????????????? ??????????????????????????? ???????????????????????? ????????????????????????????????? */
.profile-shift-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    background: #fff;
}
.profile-shift-card b { font-size: 13px; }
.profile-shift-card small { color: #8a9199; font-size: 11px; }
.profile-shift-card .form-actions { margin: 0; gap: 8px; flex-wrap: wrap; }
.profile-shift-card label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; font-weight: 700; color: #6d747d; }
.profile-shift-card input { min-height: 34px; padding: 0 10px; border: 1px solid #dfe3e8; border-radius: 7px; }

@media (max-width: 1200px) {
    .rc-line__layout { grid-template-columns: 1fr; }
    .rc-pos { border-right: 0; border-bottom: 1px solid #e8eaed; padding-right: 0; padding-bottom: 8px; }
    .rc-timeline { border-left: 0; border-top: 1px solid #e8eaed; padding-left: 0; padding-top: 8px; }
    .rc-data__row, .rc-data__row--people { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .shift-rc-hero, .shift-rc-hero--compact { display: grid; grid-template-columns: 1fr; }
    .shift-rc-hero--compact .shift-rc-hero__stats { min-width: 0; }
    .rc-machine__top { grid-template-columns: 56px 1fr; }
    .rc-machine__kpi { grid-column: 1 / -1; text-align: left; }
}

/* Forms and settings */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid label { display: flex; color: #555c65; flex-direction: column; gap: 7px; font-size: 10px; font-weight: 700; }
.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,
.role-fields input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  height: 43px;
  padding: 0 13px;
  border: 1px solid #dfe2e5;
  border-radius: 8px;
  outline: none;
  color: #22272d;
  background: #fff;
  font-size: 12px;
  box-sizing: border-box;
}
.form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.form-grid select:focus,
.role-fields input:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,168,150,.08);
}

/* ?????????????????????????????????/????????????????????: ???????? ????????????????????????????????????????????? ???????????????????? ???????????????????????? 100%?????43px */
.form-grid input[type="checkbox"],
.form-grid input[type="radio"],
.role-fields input[type="checkbox"],
.role-fields input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-field input[type="checkbox"],
label.checkbox input[type="checkbox"],
label.checkbox-field input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  margin: 0;
  padding: 0 !important;
  border: none;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  accent-color: var(--accent);
  flex: 0 0 16px;
  align-self: center;
  cursor: pointer;
}
.form-grid label.checkbox,
.form-grid label.checkbox-field,
label.checkbox,
label.checkbox-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}
.form-grid label.checkbox > span,
.form-grid label.checkbox-field > span,
label.checkbox > span,
label.checkbox-field > span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  font-weight: 600;
}
.field-full { grid-column: 1 / -1; }
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-tabs { display: flex; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); flex-direction: column; }
.settings-tabs button { display: flex; width: 100%; padding: 13px 12px; border: 0; border-radius: 9px; color: #737b84; background: transparent; text-align: left; align-items: center; gap: 12px; cursor: pointer; }
.settings-tabs button > span { width: 22px; text-align: center; font-size: 16px; }
.settings-tabs button div { display: flex; flex-direction: column; }
.settings-tabs button b { font-size: 11px; }
.settings-tabs button small { color: #a1a6ad; font-size: 8px; }
.settings-tabs button.active { color: #30353b; background: #fff6e4; }
.settings-tabs button.active > span { color: var(--accent-dark); }
.settings-tabs__group { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.settings-tabs__group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.settings-tabs__label {
  display: block; padding: 4px 8px 6px; color: #94a3b8; font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.settings-info-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc;
  font-size: 12px;
}
.settings-api-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-api-key-row input {
  flex: 1 1 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .02em;
}
.settings-api-key-row .button {
  flex: 0 0 auto;
  height: 43px;
}
.flash-secret {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  border: 1px dashed var(--line);
}
.flash-secret label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-muted);
}
.flash-secret input {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.flash-secret small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}
.settings-quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}
.settings-quick-link p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
}
.settings-quick-link--integrations {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}
.settings-integrations {
  display: grid;
  gap: 22px;
}
.settings-integration-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.settings-integration-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}
.settings-integration-card__title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.settings-integration-card__mark {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.settings-integration-card__head h3 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.settings-integration-card__head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.settings-integration-card__toggle {
  flex: 0 0 auto;
}
.settings-integration-card__toggle span {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.settings-integration-card__body {
  padding: 20px;
  display: grid;
  gap: 18px;
}
.settings-integration-card__links {
  display: grid;
  gap: 10px;
}
.settings-integration-card__link {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-2);
}
.settings-integration-card__link span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-integration-card__link code {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  word-break: break-all;
  background: transparent;
}
.settings-integration-card__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.settings-integration-card .field-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.settings-integration-card .field-full > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.settings-integration-card .field-full input {
  width: 100%;
  box-sizing: border-box;
}
.settings-integration-card .field-hint,
.settings-integration-card__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.settings-integration-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.settings-integration-card__foot .settings-integration-card__note {
  flex: 1 1 220px;
}
@media (max-width: 860px) {
  .settings-integration-card__fields { grid-template-columns: 1fr; }
  .settings-integration-card__head { align-items: flex-start; }
}
.settings-info-strip--stack {
  flex-direction: column; align-items: flex-start; gap: 8px; font-size: 11px;
}
.settings-notify-logic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.settings-notify-logic article {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
  display: grid;
  gap: 4px;
}
.settings-notify-logic b { font-size: 12px; color: #111827; }
.settings-notify-logic small { color: #6b7280; font-size: 11px; line-height: 1.35; }
.settings-notify-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-notify-group {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.settings-notify-group > b {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  color: #374151;
}
.settings-notify-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.settings-notify-group li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #4b5563;
}
.settings-notify-group code {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 5px;
  background: #f3f4f6;
  font-size: 9px;
  color: #6b7280;
}
@media (max-width: 900px) {
  .settings-notify-logic,
  .settings-notify-catalog { grid-template-columns: 1fr; }
}
.settings-info-strip--stack code { font-size: 10px; word-break: break-all; }
.settings-cron-url { display: inline-block; max-width: 100%; }
.settings-cron-list { display: grid; gap: 12px; }
.settings-cron-card {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  display: grid; gap: 8px;
}
.settings-cron-card--all { border-color: #fcd34d; background: #fffbeb; }
.settings-cron-card header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.settings-cron-card header > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.settings-cron-card header b { font-size: 13px; color: #111827; }
.settings-cron-card header code,
.settings-cron-row__title code {
  padding: 2px 6px; border-radius: 6px; background: #f3f4f6; color: #4b5563; font-size: 10px;
}
.settings-cron-interval {
  flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: #eff6ff; color: #1d4ed8;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.settings-cron-card p { margin: 0; color: #6b7280; font-size: 12px; line-height: 1.4; }
.settings-cron-example { display: grid; gap: 4px; font-size: 10px; font-weight: 700; color: #6b7280; }
.settings-cron-example input {
  height: 36px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 8px;
  background: #f9fafb; color: #374151; font-size: 11px; font-weight: 500;
}
.settings-cron-table-wrap {
  margin: 16px 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}
.settings-cron-table-caption {
  display: grid; gap: 4px; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line); background: #f8fafc;
}
.settings-cron-table-caption b { font-size: 14px; color: #111827; }
.settings-cron-table-caption span { color: #6b7280; font-size: 12px; line-height: 1.4; }
.settings-cron-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.settings-cron-table th,
.settings-cron-table td {
  padding: 8px 12px; text-align: left; vertical-align: top; border-top: 1px solid #f3f4f6;
}
.settings-cron-table thead th {
  background: #f8fafc; color: #64748b; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; border-top: 0; white-space: nowrap;
}
.settings-cron-table tbody td:nth-child(1) { font-weight: 700; color: #111827; white-space: nowrap; }
.settings-cron-table tbody td:nth-child(2) { white-space: nowrap; }
.settings-cron-table tbody td:nth-child(3) { white-space: nowrap; color: #1d4ed8; font-weight: 700; font-size: 11px; }
.settings-cron-table tbody td:nth-child(4) { color: #6b7280; line-height: 1.4; }
.settings-cron-table code {
  padding: 2px 6px; border-radius: 6px; background: #f3f4f6; color: #4b5563; font-size: 10px;
}
.settings-cron-table__group th {
  background: #eef2ff; color: #1e3a8a; font-size: 12px; font-weight: 800;
  text-transform: none; letter-spacing: 0; border-top: 1px solid #e0e7ff;
}
.settings-cron-table__group small {
  display: block; margin-top: 2px; color: #64748b; font-size: 11px; font-weight: 500;
}
@media (max-width: 900px) {
  .settings-cron-table tbody td:nth-child(1) { white-space: normal; }
}
.icon-button.has-unread i[data-notify-badge]:not(:empty) { animation: monPulse 1.2s ease-out; }
.settings-panel > section { min-height: 310px; padding: 28px; }
.settings-followup {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 16px;
}
.settings-followup__spacer { min-height: 1px; }
.settings-followup__panel {
    padding: 22px 24px 24px;
    min-width: 0;
}
.settings-followup__panel .settings-block {
    margin-top: 0;
}
.settings-followup__panel .data-table td,
.settings-followup__panel .data-table th {
    white-space: nowrap;
}
.inline-form { display: inline; margin: 0; }
@media (max-width: 900px) {
    .settings-followup { grid-template-columns: 1fr; }
    .settings-followup__spacer { display: none; }
}
.maint-panel { margin-bottom: 16px; overflow: hidden; }
.maint-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px 14px;
    align-items: end;
    padding: 16px 20px 18px;
}
.maint-filter label {
    display: grid;
    gap: 6px;
    min-width: 0;
    font-size: 10px;
    font-weight: 700;
    color: #555c65;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.maint-filter input,
.maint-filter select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line, #d8dee7);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #151a21;
    box-sizing: border-box;
}
.maint-filter__actions { padding-bottom: 1px; }
.maint-form {
    padding: 16px 20px 8px;
    margin: 0;
}
.maint-form__actions {
    grid-column: 1 / -1;
    padding: 8px 0 16px;
    border-top: 0;
    justify-content: flex-start;
}
.maint-kind {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    background: #f3f4f6;
    color: #374151;
}
.maint-kind--ppr { background: #eff6ff; color: #1d4ed8; }
.maint-kind--to { background: #ecfdf5; color: #047857; }
.maint-kind--repair { background: #e6f7f4; color: #c2410c; }
.maint-status {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #e6f7f4;
    color: #9a3412;
}
.maint-status.is-done {
    background: #ecfdf5;
    color: #047857;
}
@media (max-width: 900px) {
    .maint-filter { grid-template-columns: 1fr 1fr; }
    .maint-filter__actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .maint-filter { grid-template-columns: 1fr; }
}
.section-title { margin-bottom: 28px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.section-title h2 { font-size: 16px; }
.section-title p { margin: 0; color: #9198a1; font-size: 10px; }
.form-actions { display: flex; padding: 18px 28px; border-top: 1px solid var(--line); align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.form-actions[hidden],
[data-settings-actions][hidden] {
  display: none !important;
}
.form-actions--flush { padding-top: 0; border-top: 0; }
.form-actions .button {
  align-self: center;
  justify-content: center;
  text-align: center;
}
.color-field { display: flex; height: 43px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; align-items: center; }
.color-field input { width: 48px; height: 31px; padding: 0; border: 0; }
.color-field code { margin-left: 10px; color: #727981; font-size: 10px; }
.switch-list { display: flex; flex-direction: column; gap: 10px; }
.switch-list label { position: relative; display: flex; padding: 16px; border: 1px solid var(--line); border-radius: 10px; align-items: center; justify-content: space-between; cursor: pointer; }
.switch-list label div { display: flex; flex-direction: column; }
.switch-list label b { font-size: 11px; }
.switch-list label small { color: #949ba3; font-size: 9px; }
.switch-list input { position: absolute; opacity: 0; }
.switch-list i { position: relative; width: 38px; height: 21px; border-radius: 20px; background: #d8dce0; transition: .2s; }
.switch-list i::after { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; content: ""; transition: .2s; }
.switch-list input:checked + i { background: var(--accent); }
.switch-list input:checked + i::after { transform: translateX(17px); }

/* Users table */
.table-panel { overflow: hidden; }
.table-tools { display: flex; min-height: 66px; padding: 12px 20px; border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; }
.table-tools > span { color: #969da5; font-size: 10px; }
.search-field { display: flex; width: min(350px, 100%); height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: #9aa0a7; align-items: center; gap: 8px; }
.search-field input { width: 100%; border: 0; outline: 0; color: #444a51; background: transparent; font-size: 10px; }
.table-scroll { overflow-x: auto; }
.data-table,
.table { width: 100%; border-collapse: collapse; }
.data-table th,
.table th { padding: 12px 20px; color: #9198a0; background: #f8f9fa; text-align: left; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.data-table td,
.table td { padding: 14px 20px; border-top: 1px solid #eef0f2; color: #69717a; font-size: 10px; white-space: nowrap; }
.data-table tr:hover td,
.table tr:hover td { background: #fcfcfd; }
.table { display: table; }
.panel > .table,
.panel > .table-scroll,
.settings-block > .table {
    width: 100%;
}
.panel > .table thead th:first-child,
.panel > .data-table thead th:first-child { padding-left: 20px; }

/* ????????????????????????? ??????????????????????????????????? */
.activity-log-panel .table-scroll {
  overflow-x: auto;
}
.activity-log-details {
  max-width: 420px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: #64748b;
}
.activity-log-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.activity-log-table th,
.activity-log-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-log-table th:nth-child(1),
.activity-log-table td:nth-child(1) { width: 24%; }
.activity-log-table th:nth-child(2),
.activity-log-table td:nth-child(2) { width: 10%; }
.activity-log-table th:nth-child(3),
.activity-log-table td:nth-child(3) { width: 22%; }
.activity-log-table th:nth-child(4),
.activity-log-table td:nth-child(4) { width: 28%; }
.activity-log-table th:nth-child(5),
.activity-log-table td:nth-child(5) { width: 16%; }
.person { display: flex; min-width: 230px; align-items: center; gap: 11px; }
.person div { display: flex; flex-direction: column; }
.person b { color: #2e343a; font-size: 11px; }
.person small { color: #969ca4; font-size: 9px; }
.role-badge { padding: 5px 8px; border: 1px solid #e1e4e7; border-radius: 6px; color: #5e6670; background: #f7f8f9; font-size: 9px; font-weight: 700; }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; }
.state i { width: 6px; height: 6px; border-radius: 50%; }
.state.online { color: #258864; }
.state.online i { background: var(--green); }
.state.disabled { color: #9299a1; }
.state.disabled i { background: #afb4ba; }
.drawing-badge { display: inline-flex; min-height: 26px; padding: 0 8px; border-radius: 6px; align-items: center; font-size: 8px; font-weight: 800; white-space: nowrap; text-decoration: none; }
.drawing-badge.ok { color: #23775a; background: #e9f7f1; }
.drawing-badge.ok:hover { color: #fff; background: #278363; }
.drawing-badge.missing { color: #a84454; background: #fff1f3; }
.form-hint { margin: 0; padding: 12px 14px; border-radius: 8px; color: #6d757e; background: #f6f8f9; font-size: 9px; line-height: 1.45; }
.form-hint b { color: #4d565f; }
.drawing-upload input[type="file"] { width: 100%; padding: 12px; border: 1px dashed #d9ae59; border-radius: 8px; background: #f0faf8; font-size: 10px; }
.entity-name a { color: inherit; text-decoration: none; }
.entity-name a:hover { color: var(--accent); }
.item-picker { position: relative; display: flex; flex-direction: column; gap: 8px; }
.item-picker > label span { color: #646c75; font-size: 8px; font-weight: 700; }
.item-picker input[type="search"] { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #dfe2e5; border-radius: 8px; outline: none; background: #fff; font-size: 11px; }
.item-picker input[type="search"]:focus { border-color: var(--accent); }
.item-picker__results { position: absolute; top: 68px; left: 0; right: 0; z-index: 5; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.modal .item-picker__results { z-index: 40; max-height: min(280px, 42vh); }
.item-picker__option { display: grid; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #eef0f2; background: #fff; text-align: left; cursor: pointer; gap: 2px; }
.item-picker__option:last-child { border-bottom: 0; }
.item-picker__option:hover { background: #fff8eb; }
.item-picker__option b { font-size: 10px; }
.item-picker__option span { color: #505963; font-size: 10px; }
.item-picker__option small { color: #9299a1; font-size: 8px; }
.item-picker__empty { padding: 12px; color: #9299a1; font-size: 10px; }
.item-picker__selected { display: flex; padding: 10px 12px; border-radius: 8px; background: #f2faf6; flex-direction: column; gap: 3px; }
.item-picker__selected b { font-size: 11px; }
.item-picker__selected small { color: #6d757e; font-size: 9px; }
.setup-builder-head { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding-top: 0; margin-bottom: 10px; }
.setup-builder-head h2 { margin: 0 0 2px; font-size: 13px; }
.setup-builder-head p { margin: 0; color: #8a929b; font-size: 9px; }
.setup-create-row { display: grid; margin-bottom: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; grid-template-columns: 70px 140px 1fr 110px 28px; align-items: end; gap: 8px; }
.setup-create-row > input[type="hidden"] { display: none !important; }
.setup-create-row label { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.setup-create-row label > span { color: #646c75; font-size: 8px; font-weight: 700; }
.setup-create-row input, .setup-create-row select { width: 100%; height: 35px; padding: 0 8px; border: 1px solid #dfe2e5; border-radius: 6px; outline: none; background: #fff; font-size: 9px; box-sizing: border-box; }
.setup-create-row [data-remove-setup-row],
.setup-create-row [data-remove-item-setup],
.setup-create-row__remove {
  width: 28px;
  height: 35px;
  border: 0;
  border-radius: 6px;
  color: #a94e5c;
  background: #fff0f2;
  cursor: pointer;
  align-self: end;
  flex: 0 0 auto;
  line-height: 1;
  font-size: 16px;
}
.setup-create-row--item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  grid-template-columns: none;
}
.setup-create-row__main {
  display: grid;
  grid-template-columns: 64px minmax(120px, 1.2fr) 96px minmax(120px, 1fr) 36px;
  align-items: end;
  gap: 8px;
}
.setup-tools {
  padding: 10px;
  border: 1px dashed #d5e0e6;
  border-radius: 10px;
  background: #fff;
}
.setup-tools__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.setup-tools__head b {
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}
.setup-tools__table {
  width: 100%;
  min-width: 520px;
  table-layout: fixed;
}
.setup-tools__table th,
.setup-tools__table td {
  padding: 8px !important;
  text-align: center;
  vertical-align: middle;
  white-space: normal !important;
  font-size: 11px;
}
.setup-tools__table th:nth-child(3),
.setup-tools__table td:nth-child(3) {
  text-align: left;
}
.setup-tools__table th:nth-child(1) { width: 56px; }
.setup-tools__table th:nth-child(2) { width: 18%; }
.setup-tools__table th:nth-child(3) { width: auto; }
.setup-tools__table th:nth-child(4) { width: 96px; }
.setup-tools__table th:nth-child(5) { width: 108px; }
.setup-tools__thumb {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f5;
  cursor: zoom-in;
}
.setup-tools__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.setup-tools__article {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
}
.setup-tools__durability {
  width: 78px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dfe2e5;
  border-radius: 7px;
  text-align: center;
  font-size: 12px;
}
.setup-tools__actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.setup-tools__empty {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
}
.setup-tools--info {
  padding: 0;
  overflow: hidden;
}
.setup-tools--info > summary.setup-tools__toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  list-style: none;
}
.setup-tools--info > summary.setup-tools__toggle::-webkit-details-marker {
  display: none;
}
.setup-tools--info > summary.setup-tools__toggle::marker {
  content: '';
  display: none;
}
.setup-tools__toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.setup-tools__toggle-label b {
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}
.setup-tools__toggle-label small {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e8eef2;
  color: #64748b;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.setup-tools__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform .18s ease;
  flex: 0 0 auto;
}
.setup-tools--info[open] .setup-tools__chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.setup-tools__panel {
  padding: 0 10px 10px;
  border-top: 1px solid #edf1f4;
}
.setup-tools__table--info {
  min-width: 0;
}
.setup-tools__table--info th:nth-child(1),
.setup-tools__table--info td:nth-child(1) { width: 56px; }
.setup-tools__table--info th:nth-child(2),
.setup-tools__table--info td:nth-child(2) { width: 20%; }
.setup-tools__table--info th:nth-child(3),
.setup-tools__table--info td:nth-child(3) { width: auto; text-align: left; }
.setup-tools__table--info th:nth-child(4),
.setup-tools__table--info td:nth-child(4) { width: 96px; }
.setup-tools__table--info th:nth-child(5),
.setup-tools__table--info td:nth-child(5) { display: none; }
.setup-tool-picker {
  padding: 12px 20px 8px;
  display: grid;
  gap: 10px;
}
.setup-tool-picker__search {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.setup-tool-picker__search input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.setup-tool-picker__table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.setup-tool-picker__table th,
.setup-tool-picker__table td {
  white-space: normal !important;
  vertical-align: middle;
}
.setup-tool-picker__table th:nth-child(1),
.setup-tool-picker__table td:nth-child(1) { width: 64px; text-align: center; }
.setup-tool-picker__table th:nth-child(2),
.setup-tool-picker__table td:nth-child(2) { width: 22%; }
.setup-tool-picker__table th:nth-child(3),
.setup-tool-picker__table td:nth-child(3) { width: auto; text-align: left; }
.setup-tool-picker__table th:nth-child(4),
.setup-tool-picker__table td:nth-child(4) { width: 110px; text-align: center; }
.setup-tool-picker__thumb {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: #eef2f5;
}
#setupToolingPickerModal.modal--wide {
  width: min(96vw, 980px);
}
#setupToolingPickerModal .modal__card {
  max-height: min(90vh, 860px);
}
#setupToolingPickerModal .setup-tool-picker {
  padding: 8px 22px 4px;
}
#setupToolingPickerModal .table-scroll {
  max-height: min(58vh, 520px);
  overflow: auto;
}
.button--sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}
.item-setups-box {
  margin: 0;
  padding: 4px 26px 12px;
  border-top: 1px solid #eef0f2;
}
.item-setups-rows { display: flex; flex-direction: column; gap: 8px; }
.item-setups-rows .setup-create-row { margin-bottom: 0; }
#nomenclatureModal.modal--wide { width: min(96vw, 980px); }
#nomenclatureModal .form-grid { padding-bottom: 14px; }
#nomenclatureModal .form-hint { margin: 0; }
@media (max-width: 680px) {
  .setup-create-row { grid-template-columns: 1fr; }
  .setup-create-row__main { grid-template-columns: 1fr; }
  .setup-create-row [data-remove-setup-row],
  .setup-create-row [data-remove-item-setup],
  .setup-create-row__remove { width: 100%; }
}
.actions-cell { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.actions-cell form { margin: 0; }
.table-action { padding: 5px 7px; border: 0; color: #737b84; background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.table-action.danger { color: var(--red); }
[data-search-row][hidden] { display: none !important; }

/* Production structure */
.entity-summary { display: grid; margin-bottom: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.entity-summary article { display: flex; padding: 17px 19px; border: 1px solid var(--line); border-radius: 11px; background: #fff; flex-direction: column; }
.entity-summary small { color: #9299a2; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.entity-summary strong { margin-top: 4px; font-size: 22px; letter-spacing: -.04em; }
.entity-name { display: flex; min-width: 210px; align-items: center; gap: 11px; }
.entity-name > div { display: flex; flex-direction: column; }
.entity-name b { color: #2e343a; font-size: 11px; }
.entity-name small { color: #969ca4; font-size: 8px; }
.entity-name--link { width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.entity-name--link:hover b { color: var(--accent-dark); }
.entity-name--link:hover small { color: var(--accent-dark); }
.item-detail { padding-bottom: 8px; }
.item-detail__meta { display: grid; margin: 0 26px 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.item-detail__meta article { display: flex; min-height: 62px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; flex-direction: column; justify-content: center; gap: 4px; }
.item-detail__meta small { color: #8a9199; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.item-detail__meta b { color: #2f353b; font-size: 11px; word-break: break-word; white-space: normal; }
.item-detail__meta a { color: var(--accent-dark); text-decoration: none; }
.item-detail__meta a:hover { text-decoration: underline; }
.item-detail__setups { margin: 0 26px 8px; }
.item-detail__setups .section-title { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eef0f2; }
.item-detail__table td { white-space: normal; }
.item-detail__setup-main td {
  vertical-align: middle;
}
.item-detail__setup-tools-row > td {
  padding: 0 10px 12px !important;
  background: #f8fafb;
  border-top: 0 !important;
}
.item-detail__setup-tools-row .setup-tools {
  margin-top: 0;
  background: #fff;
}
#nomenclatureDetailModal.modal--wide {
  width: min(96vw, 1100px);
}
#nomenclatureDetailModal .modal__card {
  max-height: min(92vh, 920px);
  overflow: auto;
}
.item-detail__plan { margin: 0 26px 16px; padding: 14px; border: 1px solid #c5ebe4; border-radius: 10px; background: #f0faf8; }
.item-detail__plan .section-title { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #f0e2c2; }
.item-detail__plan .section-title h2 { margin: 0 0 3px; }
.item-detail__plan .section-title p { margin: 0; color: #8d7a4d; font-size: 9px; }
.item-detail__plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.item-detail__plan-grid--basis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.item-detail__plan-grid article { display: flex; min-height: 56px; padding: 10px 12px; border: 1px solid #f0e4c5; border-radius: 8px; background: #fff; flex-direction: column; justify-content: center; gap: 3px; }
.item-detail__plan-grid small { color: #97845a; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.item-detail__plan-grid b { color: #3a3427; font-size: 10px; white-space: normal; word-break: break-word; }
.item-detail__plan-cell { color: var(--accent-dark); }
.item-detail__mv-edit { display: flex; flex-direction: column; gap: 4px; min-width: 118px; }
.item-detail__mv-edit input[type="number"] {
  width: 100%;
  max-width: 148px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.item-detail__mv-edit small { color: #8a9199; font-size: 10px; }
.item-detail__mv-actions { margin: 12px 0 0; padding: 0; justify-content: flex-start; }
@media (max-width: 720px) {
  .item-detail__meta { grid-template-columns: 1fr 1fr; }
  .item-detail__plan-grid,
  .item-detail__plan-grid--basis { grid-template-columns: 1fr; }
}
.entity-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px; color: #a46800; background: #fff2d7; place-items: center; font-size: 15px; }
.machine-state { display: inline-flex; padding: 5px 8px; border-radius: 6px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.machine-state--available { color: #277b61; background: #eaf8f3; }
.machine-state--working { color: #286fbd; background: #eaf3fd; }
.machine-state--setup { color: #a66a00; background: #fff2d8; }
.machine-state--maintenance { color: #9c5260; background: #fceef1; }
.machine-state--offline { color: #747b84; background: #eef0f2; }
.machine-toolbar { display: flex; margin-bottom: 16px; justify-content: flex-end; }
.machine-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.machine-tile {
  display: flex;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  flex-direction: column;
  overflow: hidden;
}
.machine-tile__media {
  position: relative;
  height: 96px;
  overflow: hidden;
  background: linear-gradient(180deg, #d9e7e4, #c5d5d2);
}
.machine-tile__media .machine-photo--tile {
  width: 100%;
  height: 96px;
}
.machine-tile__badges {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.machine-tile__badges .state {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(4px);
  font-size: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.machine-tile__cnc-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .88);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.machine-tile__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
  min-width: 0;
}
.machine-tile__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.machine-tile__identity {
  min-width: 0;
  flex: 1 1 auto;
}
.machine-tile__head h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.machine-tile__num {
  color: #64748b;
  font-weight: 700;
}
.machine-tile__loc {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.3;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.machine-tile__inv {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.machine-tile__spec {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.machine-tile__spec span {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 10px;
  line-height: 1.25;
}
.machine-tile__cnc {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.35;
}
.machine-tile__cnc.is-online {
  border-color: #86efac;
  background: #f0fdf4;
}
.machine-tile__cnc.is-offline {
  border-color: #fecaca;
  background: #fef2f2;
}
.machine-tile__cnc.is-stale {
  border-color: #fde68a;
  background: #fffbeb;
}
.machine-tile__cnc-net {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
  text-transform: uppercase;
}
.machine-tile__cnc.is-online .machine-tile__cnc-net { color: #15803d; }
.machine-tile__cnc.is-offline .machine-tile__cnc-net,
.machine-tile__cnc.is-stale .machine-tile__cnc-net { color: #94a3b8; }
.machine-tile__cnc-shop {
  display: block;
  font-size: 12px;
  font-weight: 700;
}
.machine-tile__cnc.cnc-shop--idle .machine-tile__cnc-shop { color: #d97706; }
.machine-tile__cnc.cnc-shop--wait .machine-tile__cnc-shop { color: #2563eb; }
.machine-tile__cnc.cnc-shop--running .machine-tile__cnc-shop { color: #15803d; }
.machine-tile__cnc.cnc-shop--alarm .machine-tile__cnc-shop { color: #b91c1c; }
.machine-tile__cnc.cnc-shop--offline .machine-tile__cnc-shop { color: #64748b; }
.machine-tile__cnc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
}
.machine-tile__cnc-meta span {
  white-space: nowrap;
}
.machine-tile__cnc-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #cbd5e1;
}
.machine-tile__cnc[data-cnc-open] {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.machine-tile__cnc-held {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  font-style: normal;
  color: #64748b;
}
.machine-tile__cnc-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
}
.machine-tile__cnc-open {
  display: block;
  margin-top: 6px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 600;
}
.machine-tile__cnc[data-cnc-open]:hover {
  border-color: #93c5fd;
}
.machine-tile__cnc-program {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.machine-tile__cnc-alarm {
  display: block;
  margin-top: 4px;
  color: #b91c1c;
  font-style: normal;
  font-size: 10px;
  line-height: 1.35;
}
.machine-tile__note {
  margin: 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.machine-tile__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eef2f6;
}
.machine-tile__station {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.machine-tile__station-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}
.machine-tile__station-actions {
  display: flex;
  gap: 4px;
}
.machine-tile__station-actions .button {
  min-width: 30px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}
.machine-tile__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.machine-tile__actions form { margin: 0; }
.machine-tile__actions .button {
  min-height: 28px;
  padding-inline: 10px;
  font-size: 10px;
}
.machine-tile dl .field-full { grid-column: 1 / -1; }
.machine-tile dl .field-full dd { white-space: normal; }
.user-pin-box {
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, .02);
  display: grid;
  gap: 10px;
}
.user-pin-box__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #555c65;
  font-size: 10px;
  font-weight: 700;
}
.user-pin-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.user-pin-row input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px !important;
  letter-spacing: .18em;
  font-weight: 700;
}
.user-pin-row .button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.user-pin-code {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef2f6;
}
.user-esign-code {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #0f766e;
}
.user-pin-box .muted { margin: 0; font-size: 12px; }
.user-pin-box .is-hidden { display: none !important; }

/* Teams and schedules */
.team-grid, .schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.team-card, .schedule-card { display: flex; min-height: 330px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 3px 12px rgba(20,24,30,.025); flex-direction: column; }
.team-card__header { display: flex; padding-bottom: 16px; border-bottom: 1px solid var(--line); align-items: center; gap: 11px; }
.team-card__header > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.team-card__header h2 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.team-card__header small { color: #979da5; font-size: 8px; }
.team-avatar { display: grid; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; color: #8e5a00; background: #fff1d1; place-items: center; font-size: 15px; font-weight: 800; }
.team-leader { display: flex; margin: 17px 0; padding: 12px 14px; border-radius: 9px; background: #f7f8f9; flex-direction: column; }
.team-leader small, .team-members small { color: #969da5; font-size: 8px; text-transform: uppercase; }
.team-leader b, .team-members b { margin-top: 2px; font-size: 10px; }
.team-members > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.member-list { display: flex; margin-top: 9px; flex-wrap: wrap; gap: 5px; }
.member-list span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: #6d747d; background: #fafbfb; font-size: 8px; }
.team-card > p { margin: 14px 0 0; color: #858c95; font-size: 9px; }
.team-card__actions { display: flex; margin-top: auto; padding-top: 18px; align-items: center; gap: 8px; }
.team-card__actions form { margin: 0; }
.team-card__actions .button { min-height: 34px; font-size: 9px; }
.member-selector { padding: 0 26px 22px; }
.member-selector .section-title { margin-bottom: 14px; }
.member-selector--roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 4px;
}
.member-selector__col {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbfc;
}
.member-selector__col .section-title h2 { margin: 0 0 4px; font-size: 15px; }
.member-selector__col .section-title p { margin: 0; color: #6b7280; font-size: 12px; }
.member-selector__grid { display: grid; max-height: 230px; overflow-y: auto; grid-template-columns: 1fr 1fr; gap: 7px; }
.member-selector--roles .member-selector__grid { grid-template-columns: 1fr; max-height: 280px; }
.member-selector__grid label { display: flex; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; align-items: center; gap: 9px; cursor: pointer; }
.member-selector__grid label:has(input:checked) { border-color: #f0bd63; background: #fff9ed; }
.member-selector__grid input { accent-color: var(--accent); }
.member-selector__grid .avatar { width: 28px; height: 28px; border-radius: 7px; }
.member-selector__grid label > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.member-selector__grid b { font-size: 9px; }
.member-selector__grid small { color: #9aa0a7; font-size: 8px; }
.team-role-block {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.team-role-block small {
  display: block;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.member-list .is-muted { color: #9aa0a7; background: transparent; border-style: dashed; }
.calculation-note { display: flex; margin-bottom: 18px; padding: 15px 18px; border: 1px solid #f0d49f; border-radius: 10px; color: #76521b; background: #fff8e9; align-items: center; gap: 13px; font-size: 10px; }
.calculation-note span { padding: 4px 7px; border-radius: 5px; color: #fff; background: #be7a0b; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.month-summary { display: grid; margin-bottom: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.month-summary article { display: flex; min-height: 92px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; align-items: center; gap: 13px; }
.month-summary .metric__icon { width: 38px; height: 38px; font-size: 12px; }
.month-summary article > div { display: flex; min-width: 0; flex-direction: column; }
.month-summary small { color: #858d96; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.month-summary strong { overflow: hidden; margin: 2px 0; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; letter-spacing: -.03em; }
.month-summary em { color: #a0a6ad; font-size: 7px; font-style: normal; }
.calendar-panel { margin-bottom: 20px; overflow-x: auto; }
.calendar-header, .calendar-legend, .calendar-weekdays, .month-calendar { min-width: 875px; }
.calendar-header { display: flex; min-height: 88px; padding: 17px 21px; border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; gap: 20px; }
.calendar-header .eyebrow { margin-bottom: 2px; }
.calendar-header h2 { margin: 0; font-size: 17px; }
.calendar-header p { margin: 3px 0 0; color: #949ba3; font-size: 8px; }
.calendar-controls { display: flex; align-items: center; gap: 7px; }
.calendar-controls select { height: 36px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: #68717a; background: #fff; font-size: 9px; }
.calendar-header .button { min-height: 36px; }
.calendar-legend { display: flex; padding: 9px 20px; border-bottom: 1px solid var(--line); background: #fff; align-items: center; justify-content: flex-end; gap: 18px; }
.calendar-legend span { display: flex; color: #858d96; align-items: center; gap: 6px; font-size: 8px; }
.calendar-legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend-user { border-left: 3px solid var(--blue); background: #edf5ff; }
.legend-team { border-left: 3px solid var(--violet); background: #f4f0ff; }
.legend-shift-1 { border-radius: 50% !important; background: var(--accent); }
.legend-shift-2 { border-radius: 50% !important; background: var(--green); }
.calendar-weekdays { display: grid; border-bottom: 1px solid var(--line); background: #f7f8f9; grid-template-columns: repeat(7, minmax(125px, 1fr)); }
.calendar-weekdays span { padding: 10px; color: #7f8790; text-align: center; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.month-calendar { display: grid; overflow-x: auto; grid-template-columns: repeat(7, minmax(125px, 1fr)); }
.calendar-day { min-height: 154px; padding: 9px; border-right: 1px solid #e8ebee; border-bottom: 1px solid #e8ebee; background: #fff; transition: background .15s; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day--blank { background: #fafbfb; }
.calendar-day.weekend:not(.today) { background: #fafbfc; }
.calendar-day:not(.calendar-day--blank):hover { background: #fdfdfd; }
.calendar-day.today { background: #f0faf8; box-shadow: inset 0 0 0 1px #f2c675; }
.calendar-day__number { display: flex; min-height: 22px; align-items: center; justify-content: space-between; }
.calendar-day__number b { display: grid; width: 22px; height: 22px; border-radius: 6px; color: #747b84; place-items: center; font-size: 9px; }
.calendar-day.today .calendar-day__number b { color: var(--accent-dark); background: var(--accent); }
.calendar-day__number span { display: grid; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; color: #fff; background: #737b85; place-items: center; font-size: 7px; font-weight: 800; }
.calendar-assignments { display: flex; margin-top: 5px; flex-direction: column; gap: 4px; }
.assignment-chip { display: flex; min-width: 0; min-height: 34px; padding: 6px; border-left: 3px solid var(--blue); border-radius: 6px; background: #edf5ff; align-items: center; gap: 6px; transition: transform .15s, box-shadow .15s; }
.assignment-chip:hover { z-index: 2; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(40,60,80,.1); }
.assignment-chip--team { border-left-color: var(--violet); background: #f4f0ff; }
.assignment-chip > span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; color: #332000; background: var(--accent); place-items: center; font-size: 8px; font-weight: 800; }
.assignment-chip--shift-2 > span { color: #fff; background: var(--green); }
.assignment-chip > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.assignment-chip b, .assignment-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-chip b { color: #3f4b57; font-size: 8px; }
.assignment-chip small { color: #7b8794; font-size: 7px; }
.assignment-chip form { margin: 0; }
.assignment-chip button { width: 16px; height: 16px; padding: 0; border: 0; color: #8e6670; background: transparent; cursor: pointer; font-size: 12px; }
.assignment-chip[hidden] { display: none !important; }
.assignment-hint { display: flex; margin: 0 26px 20px; padding: 11px 13px; border-radius: 8px; color: #667485; background: #eef5fc; align-items: center; gap: 10px; }
.assignment-hint > span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--blue); place-items: center; font-size: 9px; font-weight: 800; }
.assignment-hint p { margin: 0; font-size: 8px; }
.assignment-hint--danger { color: #8b4b54; background: #fff0f1; }
.assignment-hint--danger > span { background: #d65b69; }
.cycle-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.content-section-title { display: flex; margin: 28px 0 14px; align-items: flex-end; justify-content: space-between; }
.content-section-title .eyebrow { margin-bottom: 3px; }
.content-section-title h2 { margin: 0; font-size: 18px; }
.content-section-title p { margin: 3px 0 0; color: #9299a1; font-size: 9px; }
.content-section-title > span { padding: 5px 9px; border-radius: 7px; color: #7b838c; background: #e9ecef; font-size: 9px; font-weight: 800; }
.schedule-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.schedule-card__header .eyebrow { margin-bottom: 3px; }
.schedule-card__header h2 { margin: 0; font-size: 14px; }
.schedule-card__header p { margin: 2px 0 0; color: #9198a0; font-size: 9px; }
.shift-time { display: flex; margin: 20px 0 14px; align-items: center; gap: 11px; }
.shift-time span { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.shift-time i { height: 1px; background: #d9dde1; flex: 1; }
.schedule-days { display: flex; margin-bottom: 17px; gap: 4px; }
.schedule-days span { display: grid; width: 27px; height: 27px; border-radius: 6px; color: #a1a6ad; background: #f1f3f4; place-items: center; font-size: 8px; font-weight: 800; }
.schedule-days span.active { color: #8c5900; background: #fff0ce; }
.period-list { display: flex; max-height: 145px; padding: 10px 0; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); flex-direction: column; gap: 4px; }
.period-list > div { display: grid; padding: 5px 7px; border-left: 3px solid #d7dce1; border-radius: 4px; background: #f8f9fa; grid-template-columns: 76px 1fr; align-items: center; gap: 8px; }
.period-list > div span { color: #727a83; font-size: 8px; font-variant-numeric: tabular-nums; }
.period-list > div b { overflow: hidden; color: #505861; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.period-list__work { border-left-color: var(--green) !important; }
.period-list__lunch { border-left-color: var(--accent) !important; }
.period-list__maintenance { border-left-color: var(--blue) !important; }
.period-list__service { border-left-color: var(--violet) !important; }
.time-breakdown { margin: 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.time-breakdown div { display: flex; padding: 3px 0; justify-content: space-between; }
.time-breakdown dt { color: #8b929a; font-size: 8px; }
.time-breakdown dd { margin: 0; color: #555d66; font-size: 9px; font-weight: 700; }
.net-time { display: flex; margin: 14px 0; align-items: center; justify-content: space-between; }
.net-time span { color: #777f88; font-size: 9px; }
.net-time strong { color: #16845d; font-size: 15px; }
.work-days { padding: 0 26px 24px; }
.work-days > span { display: block; margin-bottom: 8px; color: #555c65; font-size: 10px; font-weight: 700; }
.work-days > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.work-days label input { position: absolute; opacity: 0; }
.work-days label span { display: grid; width: 42px; height: 36px; border: 1px solid var(--line); border-radius: 7px; color: #8c939b; background: #fff; place-items: center; font-size: 9px; font-weight: 800; cursor: pointer; }
.work-days label input:checked + span { border-color: #e8ad47; color: #865400; background: #fff3d9; }
.period-builder { padding: 0 26px 22px; }
.period-builder .section-title { display: flex; margin-bottom: 10px; padding-bottom: 13px; align-items: center; justify-content: space-between; gap: 15px; }
.period-builder .section-title h2 { margin-bottom: 2px; }
.period-builder__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.period-builder .button { min-height: 34px; white-space: nowrap; }
.period-row { display: grid; margin-bottom: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfb; grid-template-columns: 20px 150px 94px 94px minmax(120px, 1fr) 28px; align-items: center; gap: 7px; }
.period-row select, .period-row input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid #dfe2e5; border-radius: 6px; outline: none; background: #fff; font-size: 9px; }
.period-row select:focus, .period-row input:focus { border-color: var(--accent); }
.period-drag { color: #a1a7ae; text-align: center; cursor: grab; }
.period-row [data-remove-period] { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 6px; color: #a54a5a; background: #fff0f2; cursor: pointer; }
.schedule-preview { display: flex; margin: 0 26px 24px; padding: 15px; border-radius: 10px; color: #fff; background: #171b20; align-items: center; justify-content: space-between; gap: 8px; }
.schedule-preview div { display: flex; flex-direction: column; }
.schedule-preview small { color: #7f8791; font-size: 7px; text-transform: uppercase; }
.schedule-preview b { font-size: 10px; }
.schedule-preview > span { color: #555e68; }
.schedule-preview .result b { color: var(--accent); font-size: 13px; }
.modal--sm { width: min(92vw, 420px); }
.modal--wide { width: min(94vw, 760px); }
.modal--qc {
  width: min(99vw, 1600px);
  max-height: var(--modal-max-h);
}
.modal--qc .modal__card {
  max-height: var(--modal-max-h);
  overflow-x: hidden;
  overflow-y: auto;
}
.database-health { display: flex; margin-bottom: 22px; padding: 14px 16px; border: 1px solid #ccebdc; border-radius: 9px; background: #f0faf6; align-items: center; gap: 12px; }
.database-health div { display: flex; flex-direction: column; }
.database-health b { color: #237759; font-size: 10px; }
.database-health small { color: #6f8d82; font-size: 8px; }
.settings-backup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.settings-backup-list { display: grid; gap: 10px; }
.settings-backup-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fafbfc;
}
.settings-backup-card b { display: block; font-size: 13px; color: #111827; word-break: break-all; }
.settings-backup-card small { color: #6b7280; font-size: 12px; }
.settings-backup-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Personal cabinet */
.profile-hero { position: relative; display: flex; margin-bottom: 20px; padding: 28px; overflow: hidden; border-radius: var(--radius); color: #fff; background: #171b20; align-items: center; gap: 20px; }
.profile-hero::after { position: absolute; right: -70px; bottom: -120px; width: 280px; height: 280px; border: 1px solid rgba(26,168,150,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(26,168,150,.025); content: ""; }
.profile-avatar { display: grid; width: 76px; height: 76px; flex: 0 0 auto; border: 2px solid rgba(26,168,150,.5); border-radius: 20px; color: #17191c; background: var(--accent); box-shadow: 0 10px 30px rgba(26,168,150,.2); place-items: center; font-size: 23px; font-weight: 800; }
.profile-identity { position: relative; z-index: 1; flex: 1; }
.profile-identity .eyebrow { margin-bottom: 5px; }
.profile-identity h1 { margin: 0 0 3px; font-size: 27px; }
.profile-identity > p { margin: 0 0 12px; color: #89919a; font-size: 10px; }
.profile-identity > div { display: flex; align-items: center; gap: 12px; }
.profile-identity .role-badge { border-color: #343b44; color: #d3d6da; background: #22272d; }
.profile-meta { position: relative; z-index: 1; display: flex; padding-left: 28px; border-left: 1px solid #343a42; gap: 30px; align-items: center; }
.profile-meta div { display: flex; flex-direction: column; }
.profile-meta small { color: #737c86; font-size: 8px; text-transform: uppercase; }
.profile-meta b { margin-top: 4px; font-size: 10px; }
.profile-meta__actions { justify-content: center; }
.profile-layout--social { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); }
.social-chat {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  min-height: 420px;
  border-top: 1px solid var(--line);
}
.social-chat--list {
  grid-template-columns: 1fr;
}
.social-chat--list .social-chat__thread { display: none; }
.social-chat--thread {
  grid-template-columns: 1fr;
}
.social-chat--thread .social-chat__list {
  display: none !important;
}
.social-chat--thread .social-chat__thread {
  display: flex;
  min-height: 420px;
}
.social-chat--thread .social-chat__back {
  display: grid;
}
.social-chat__list {
  border-right: 1px solid var(--line);
  max-height: 520px;
  overflow: auto;
  background: #fff;
}
.social-chat--list .social-chat__list {
  border-right: 0;
  max-height: none;
  min-height: 420px;
}
.social-chat__list-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #eef0f2;
}
.social-chat__search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: #f2f3f5;
  color: #98a2b3;
}
.social-chat__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: #1f2937;
  height: 40px;
}
.social-chat__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f4;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.social-chat__item:hover,
.social-chat__item.is-active { background: #f7f8fa; }
.social-chat__item.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.social-chat__item.has-unread .social-chat__meta small { color: #1f2937; font-weight: 600; }
.social-presence {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}
.social-presence.is-online { color: #16a34a; }
.social-chat__avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  place-items: center;
  background: #e6f7f4;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}
.social-chat__avatar.is-online::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, .25);
}
.social-chat__meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.social-chat__meta-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.social-chat__meta b {
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-chat__meta time {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
}
.social-chat__meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a9199;
  font-size: 13px;
  line-height: 1.3;
}
.social-chat__badge {
  min-width: 20px;
  height: 20px;
  margin-top: 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2688eb;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.social-chat__badge[hidden] {
  display: none !important;
}
.social-chat__thread { display: flex; flex-direction: column; min-height: 420px; }
.social-chat__thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.social-chat__back {
  display: none;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  place-items: center;
  text-decoration: none;
  color: #1f2937;
  background: #f2f3f5;
  font-size: 18px;
  line-height: 1;
}
.social-chat--thread .social-chat__back {
  display: grid;
}
.social-chat__peer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.social-chat__peer-link:hover b { color: var(--accent-dark); }
.social-chat__thread-head b { display: block; font-size: 13px; }
.social-chat__thread-head small { color: #8a9199; font-size: 11px; }
.social-chat__thread-head .social-presence { margin-top: 3px; }
.social-chat__meta .social-presence {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-chat__pick {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: #8a9199;
}
.social-chat__messages {
  flex: 1;
  min-height: 260px;
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #f8fafc, #fff);
}
.social-msg {
  max-width: 78%;
  align-self: flex-start;
  padding: 10px 12px;
  border: 1px solid #e7eaee;
  border-radius: 12px 12px 12px 4px;
  background: #fff;
}
.social-msg.is-mine {
  align-self: flex-end;
  border-color: #c7ebe4;
  background: #ecfdf8;
  border-radius: 12px 12px 4px 12px;
}
.social-msg p { margin: 0; font-size: 13px; line-height: 1.4; color: #1f2937; }
.social-msg small,
.social-msg__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 10px;
}
.social-msg:not(.is-mine) .social-msg__meta { justify-content: flex-start; }
.social-msg__time { line-height: 1; }
.social-msg__ticks {
  display: inline-flex;
  align-items: center;
  color: #94a3b8;
  line-height: 0;
}
.social-msg__ticks.is-sent,
.social-msg__ticks.is-delivered { color: #94a3b8; }
.social-msg__ticks.is-read { color: #0ea5e9; }
.social-msg__ticks svg { display: block; }
.social-msg__image {
  display: block;
  margin: 0 0 6px;
  border-radius: 10px;
  overflow: hidden;
  max-width: 240px;
}
.social-msg__image img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  background: #f1f5f9;
}
.social-msg__file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  font-size: 12px;
  max-width: 100%;
}
.social-msg__file b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.social-msg.is-mine .social-msg__file {
  border-color: #b7e4d8;
  background: #dffaf1;
}
.social-chat__composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  align-items: end;
  position: relative;
}
.social-chat__composer-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 2px;
}
.social-chat__tool {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  overflow: hidden;
}
.social-chat__tool:hover { border-color: #cbd5e1; background: #f8fafc; }
.social-chat__tool input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.social-chat__composer-main {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
}
.social-chat__composer textarea {
  width: 100%;
  min-height: 44px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  font: inherit;
}
.social-chat__send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #111827;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.social-chat__send:hover { filter: brightness(.97); }
.social-chat__send:disabled { opacity: .55; cursor: wait; }
.social-chat__emoji {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  max-height: 150px;
  overflow: auto;
}
.social-chat__emoji[hidden] {
  display: none !important;
}
.social-chat__emoji button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
}
.social-chat__emoji button:hover { background: #f1f5f9; }
.social-chat__file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
}
.social-chat__file-chip[hidden] {
  display: none !important;
}
.social-chat__file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-chat__file-chip button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 58, 138, .12);
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.social-person__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.social-person__identity:hover b { color: var(--accent-dark); }
.sn-profile--peer .sn-profile__actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.peer-profile-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: var(--panel-gap, 16px);
}
.peer-profile-meta > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #fafbfc;
}
.peer-profile-meta span { color: #8a9199; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.peer-profile-meta b { font-size: 14px; color: #111827; word-break: break-word; }
@media (max-width: 720px) {
  .social-chat__composer { grid-template-columns: auto minmax(0, 1fr) auto; }
  .social-chat__emoji { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .peer-profile-meta { grid-template-columns: 1fr; }
}
.social-search {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 18px 12px;
}
.social-search.people-search {
  grid-template-columns: 1fr auto auto;
}
.social-search input {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
}
.social-search .button {
  min-height: 36px;
  justify-content: center;
  text-align: center;
}
.profile-panel__tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.profile-panel__tools > b {
  min-width: 1.5em;
  text-align: right;
}
.people-filters__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 14px;
}
.people-filters__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.people-filters__field > span {
  font-size: 11px;
  color: #9298a0;
}
.people-filters__field select {
  min-height: 36px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.people-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.people-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 16px;
}
.people-filters__chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  color: #5c6570;
  text-decoration: none;
  font-size: 12px;
  background: #f7f8fa;
}
.people-filters__chip:hover {
  border-color: #c9d0d8;
  color: #243041;
}
.people-filters__chip.is-active {
  border-color: #9eb0c4;
  background: #eef3f8;
  color: #1f2a37;
}
.social-people--browse {
  max-height: min(70vh, 820px);
  overflow: auto;
}
.social-people { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.social-people--search { padding-top: 4px; border-bottom: 1px solid #eef0f2; margin-bottom: 4px; }
.profile-layout--social .social-chat-panel--page { margin-bottom: 0; }
.profile-layout--social .social-chat { min-height: 520px; }
.social-people > .empty-state {
  padding: 24px 12px;
  text-align: center;
}
.social-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid #eef0f2;
}
.social-person:last-child { border-bottom: 0; }
.social-person > div:not(.social-person__actions) { flex: 1; min-width: 0; }
.social-person b { display: block; font-size: 12px; }
.social-person small { color: #8a9199; font-size: 10px; }
.social-person .social-presence { margin-top: 2px; }
.social-person__actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}
.social-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}
.social-outgoing { padding: 0 18px 14px; color: #8a9199; font-size: 11px; }
.social-chat__avatar--photo,
.sn-profile__avatar {
  overflow: hidden;
  padding: 0;
}
.social-chat__avatar--photo img,
.sn-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.social-chat-panel--page { overflow: hidden; }
.social-chat-panel--page .social-chat { min-height: 560px; }

.sn-profile {
  position: relative;
  margin-bottom: 20px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .1);
}
.sn-profile__cover-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .12) 0%, rgba(15, 23, 42, .38) 55%, rgba(15, 23, 42, .55) 100%),
    radial-gradient(560px 200px at 80% 15%, rgba(255,255,255,.16), transparent 60%);
  pointer-events: none;
}
.sn-cover--steel {
  background:
    radial-gradient(800px 220px at 20% 30%, rgba(26, 168, 150, .45), transparent 55%),
    linear-gradient(135deg, #111827 0%, #334155 48%, var(--accent-dark) 100%);
}
.sn-cover--amber {
  background:
    radial-gradient(700px 200px at 70% 10%, rgba(255, 255, 255, .25), transparent 50%),
    linear-gradient(120deg, #0b3d3a 0%, var(--accent) 45%, #5eead4 100%);
}
.sn-cover--forge {
  background:
    radial-gradient(420px 180px at 30% 80%, rgba(20, 184, 166, .35), transparent 55%),
    linear-gradient(145deg, #0c1a1c 0%, #134e4a 40%, var(--accent) 78%, #5eead4 100%);
}
.sn-cover--ocean {
  background:
    radial-gradient(600px 200px at 15% 20%, rgba(125, 211, 252, .35), transparent 55%),
    linear-gradient(125deg, #0c4a6e 0%, #0369a1 42%, #14b8a6 100%);
}
.sn-cover--forest {
  background:
    radial-gradient(500px 180px at 75% 30%, rgba(167, 243, 208, .28), transparent 55%),
    linear-gradient(135deg, #052e16 0%, #166534 50%, #65a30d 100%);
}
.sn-cover--copper {
  background:
    radial-gradient(480px 180px at 20% 40%, rgba(254, 215, 170, .35), transparent 55%),
    linear-gradient(130deg, #431407 0%, #9a3412 40%, #c2410c 70%, #fdba74 100%);
}
.sn-cover--night {
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.55), transparent 40%),
    radial-gradient(2px 2px at 60% 50%, rgba(255,255,255,.4), transparent 40%),
    radial-gradient(2px 2px at 80% 20%, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(150deg, #020617 0%, #1e293b 55%, #312e81 100%);
}
.sn-cover--graphite {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, #0f172a 0%, #475569 50%, #94a3b8 100%);
}
.sn-profile__cover-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, .42);
  color: #fff;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(6px);
}
.sn-profile__cover-edit:hover,
.sn-profile__cover-edit.is-open {
  background: rgba(15, 23, 42, .62);
}
.sn-cover-picker {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 52px 12px 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(10px);
}
.sn-cover-picker__grid {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}
.sn-cover-option {
  position: relative;
  display: grid;
  width: 72px;
  height: 44px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  place-items: end start;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.sn-cover-option input { position: absolute; opacity: 0; pointer-events: none; }
.sn-cover-option span {
  margin: 0 0 4px 6px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.sn-cover-option.is-active,
.sn-cover-option:has(input:checked) {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, .35);
}
.sn-profile__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  min-height: 168px;
  padding: 56px 22px 22px;
  background: transparent;
}
.sn-profile__avatar-wrap { position: relative; width: 112px; height: 112px; }
.sn-profile__avatar {
  width: 112px;
  height: 112px;
  border: 4px solid rgba(255, 255, 255, .92);
  border-radius: 28px;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .28);
  object-fit: cover;
}
.sn-profile__avatar--initials {
  display: grid;
  place-items: center;
  color: #17191c;
  font-size: 34px;
  font-weight: 800;
}
.sn-profile__avatar-form { position: absolute; right: -2px; bottom: -2px; margin: 0; }
.sn-profile__avatar-btn {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .2);
  overflow: hidden;
}
/* ???????? display:none ??????? ????????????????????? ???? Android WebView ???????????????????? ????????????????????????? ?????????????????????? change ?????????????????????? ???????? ???????????????????????????????????????????????. */
.sn-profile__avatar-btn input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.01;
  cursor: pointer;
}
.sn-profile__avatar-btn span { position: relative; z-index: 1; line-height: 1; }
.sn-profile__avatar-status {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 3;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}
.sn-profile__avatar-form.is-uploading .sn-profile__avatar-btn { opacity: .7; pointer-events: none; }
.sn-profile__info h1 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 26px;
  text-shadow: 0 1px 2px rgba(15, 23, 42, .35);
}
.sn-profile__info > p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
}
.sn-profile__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
}
.sn-profile__stats a,
.sn-profile__stats > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  text-decoration: none;
  min-width: 64px;
}
.sn-profile__stats b { font-size: 18px; line-height: 1.1; }
.sn-profile__stats span { color: rgba(255, 255, 255, .72); font-size: 11px; line-height: 1.2; }
.sn-profile__presence {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  color: rgba(255, 255, 255, .72);
}
.sn-profile__presence.is-online { color: #34d399; }
.sn-profile__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}
.sn-profile__actions .button {
  min-height: 36px;
  text-align: center;
}
.sn-profile__actions .button--primary {
  box-shadow: 0 4px 14px rgba(15, 23, 42, .22);
}
.sn-profile__nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
}
.sn-profile__nav.has-badge:not(.button--primary) {
  border-color: rgba(251, 191, 36, .85) !important;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, .35), 0 4px 14px rgba(15, 23, 42, .28);
}
.sn-profile__nav.has-badge.button--primary {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 4px 16px rgba(15, 23, 42, .28);
}
.sn-profile__nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}
.sn-profile__nav.button--primary .sn-profile__nav-badge {
  background: #111827;
  color: #fff;
}
.sn-profile__btn-ghost {
  border-color: rgba(255, 255, 255, .45) !important;
  background: rgba(15, 23, 42, .28) !important;
  color: #fff !important;
}
.sn-profile__btn-ghost:hover {
  background: rgba(15, 23, 42, .45) !important;
}
.sn-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 20px;
}
.sn-feed__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid #e7eaee;
  border-radius: 12px;
  background: #fafbfc;
  color: inherit;
  text-decoration: none;
}
.sn-feed__card:hover { border-color: #cbd5e1; background: #fff; }
.sn-feed__card b { font-size: 14px; }
.sn-feed__card span { color: #8a9199; font-size: 12px; }

@media (max-width: 900px) {
  .social-chat { grid-template-columns: 1fr; }
  .social-chat__list {
    max-height: none;
    border-right: 0;
    border-bottom: 0;
  }
  .social-chat--list .social-chat__list { min-height: 420px; }
  .social-chat--thread .social-chat__thread { min-height: 420px; }
  .social-chat__pick { display: none; }
  .profile-layout--messages { grid-template-columns: 1fr; }
  .sn-profile__card {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding-top: 52px;
  }
  .sn-profile__actions { width: 100%; }
  .sn-feed { grid-template-columns: 1fr; }
  .psc__meta,
  .psc__meta--two { grid-template-columns: 1fr; }
}
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .7fr); gap: 20px; align-items: start; }
.profile-main, .profile-aside { display: flex; flex-direction: column; gap: 20px; }
.profile-panel form > .form-grid { padding: 25px; }
.profile-section-icon { display: grid; width: 34px; height: 34px; border-radius: 8px; color: var(--accent-dark); background: #e6f7f4; place-items: center; font-size: 15px; }
.password-rules { display: flex; margin: 0 25px 22px; color: #969da5; gap: 20px; font-size: 8px; }
.password-rules span::before { margin-right: 6px; color: var(--green); content: "✓"; font-weight: 800; }
.profile-side-panel { overflow: hidden; }
.profile-team-card {
  box-shadow: none;
  border: 1px solid var(--line);
}
.profile-side-panel .panel__header > b,
.profile-side-panel__count {
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}
.profile-team-card .panel__header {
  padding: 18px 18px 14px;
  align-items: flex-start;
}
.profile-team-card .panel__header h2 {
  font-size: 16px;
  letter-spacing: -.02em;
}
.profile-team-card .panel__header p {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}
.profile-team-list { padding: 0 16px 16px; }
.profile-team-list > .empty-state { padding: 20px 0; text-align: center; }

.profile-team-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0 4px;
  border-bottom: 1px solid #eef1f4;
  width: 100%;
  box-sizing: border-box;
}
.profile-team-row:last-child { border-bottom: 0; }
.profile-team-row__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.profile-team-row__head > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 2px;
}
.profile-team-row__head b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
.profile-team-row__head small {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.3;
}
.profile-team-row .team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
  background: linear-gradient(180deg, #e6f7f4, #d5f3ee);
  border: 1px solid #a7e4db;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: 0 1px 2px rgba(15, 118, 110, .10);
}

.profile-team-members {
  margin: 0;
  padding: 2px 0 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-team-members__label {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 0 8px;
  margin: 0;
}
.profile-team-member {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 0;
  margin: 0;
  border: 0;
  border-top: 1px solid #f1f5f9;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.profile-team-member:hover {
  background: linear-gradient(90deg, rgba(26, 168, 150, .04), transparent 70%);
}
.profile-team-member__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
  gap: 5px;
}
.profile-team-member .team-avatar--sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-dark);
  background: linear-gradient(180deg, #e6f7f4, #d5f3ee);
  border: 1px solid #a7e4db;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.profile-team-member b {
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
}
.profile-role-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  color: #475569;
  background: #eef2f7;
  border: 1px solid #e2e8f0;
}
.profile-role-badge.is-operator {
  color: var(--accent-dark);
  background: #e6f7f4;
  border-color: #a7e4db;
}
.profile-role-badge.is-setupter {
  color: #115e59;
  background: #f0fdfa;
  border-color: #99f6e4;
}
.profile-role-badge.is-member {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.profile-my-schedule .panel__header { margin-bottom: 0; }
.profile-my-cal { padding: 0 0 12px; }
.profile-my-cal__month {
  display: flex;
  padding: 10px 14px 8px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.profile-my-cal__month > div { text-align: center; }
.profile-my-cal__month b { display: block; color: #1f2937; font-size: 13px; line-height: 1.2; }
.profile-my-cal__month a:not(.icon-button) {
  color: #64748b;
  text-decoration: none;
  font-size: 10px;
}
.profile-my-cal__month a:not(.icon-button):hover { color: var(--accent-dark); }
.profile-my-cal__weekdays {
  display: grid;
  padding: 0 10px;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.profile-my-cal__weekdays span {
  padding: 4px 0;
  color: #94a3b8;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.profile-my-cal__grid {
  display: grid;
  padding: 4px 10px 8px;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.profile-my-cal__cell {
  display: flex;
  min-height: 42px;
  padding: 4px 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.profile-my-cal__cell--blank { pointer-events: none; background: transparent; min-height: 0; }
.profile-my-cal__cell.is-weekend { background: #f8fafc; }
.profile-my-cal__cell.is-today { border-color: #5ec4b6; background: #f0faf8; }
.profile-my-cal__cell.is-selected { border-color: #334155; box-shadow: inset 0 0 0 1px #334155; }
.profile-my-cal__cell.has-shift { background: #f1f5f9; }
.profile-my-cal__cell.has-shift.is-today { background: #e6f7f4; }
.profile-my-cal__cell:hover:not(.profile-my-cal__cell--blank) { background: #eef2f7; }
.profile-my-cal__num { color: #475569; font-size: 11px; font-weight: 700; line-height: 1.1; }
.profile-my-cal__cell.is-today .profile-my-cal__num { color: var(--accent-dark); }
.profile-my-cal__shifts { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.profile-my-cal__shifts i,
.profile-my-cal__legend i {
  display: inline-grid;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  color: #fff;
  place-items: center;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}
.profile-my-cal__shifts i.shift-1,
.profile-my-cal__legend i.shift-1,
.profile-my-cal__row.shift-1 .profile-my-cal__badge { background: #d97706; }
.profile-my-cal__shifts i.shift-2,
.profile-my-cal__legend i.shift-2,
.profile-my-cal__row.shift-2 .profile-my-cal__badge { background: var(--accent-dark); }
.profile-my-cal__shifts i.shift-3,
.profile-my-cal__legend i.shift-3,
.profile-my-cal__row.shift-3 .profile-my-cal__badge { background: #334155; }
.profile-my-cal__legend {
  display: flex;
  padding: 0 14px 10px;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-my-cal__legend span {
  display: inline-flex;
  color: #94a3b8;
  align-items: center;
  gap: 4px;
  font-size: 9px;
}
.profile-my-cal__day {
  margin: 0 12px;
  padding: 10px 12px;
  border: 1px solid #e8edf2;
  border-radius: 10px;
  background: #fafbfc;
}
.profile-my-cal__day-head {
  display: flex;
  margin-bottom: 8px;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.profile-my-cal__day-head small {
  color: #94a3b8;
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.profile-my-cal__day-head b { color: #1f2937; font-size: 13px; }
.profile-my-cal__day .empty-state { padding: 8px 0; font-size: 12px; }
.profile-my-cal__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-direction: column;
  gap: 6px;
}
.profile-my-cal__row {
  display: flex;
  padding: 8px 9px;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  background: #fff;
  align-items: center;
  gap: 8px;
}
.profile-my-cal__badge {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 6px;
  color: #fff;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}
.profile-my-cal__row > div { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 1px; }
.profile-my-cal__row b { color: #1f2937; font-size: 12px; }
.profile-my-cal__row small { color: #64748b; font-size: 10px; }
.full-access { display: flex; margin: 18px; padding: 14px; border: 1px solid #f0d8a9; border-radius: 9px; color: #7e550d; background: #fff8ea; align-items: center; gap: 12px; }
.full-access > span { font-size: 19px; }
.full-access div { display: flex; flex-direction: column; }
.full-access b { font-size: 10px; }
.full-access small { color: #a18757; font-size: 8px; }
.profile-permissions { padding: 9px 20px 17px; }
.profile-permissions > div:not(.empty-state) { display: flex; padding: 9px 0; border-bottom: 1px solid #eef0f2; align-items: center; justify-content: space-between; }
.profile-permissions b { font-size: 9px; }
.profile-permissions span { color: #939aa2; font-size: 8px; }
.profile-activity { padding: 10px 20px 17px; }
.profile-activity > div:not(.empty-state) { display: flex; padding: 8px 0; align-items: center; gap: 9px; }
.profile-activity i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); }
.profile-activity span { display: flex; flex-direction: column; }
.profile-activity b { font-size: 8px; text-transform: capitalize; }
.profile-activity small { color: #9aa0a7; font-size: 7px; }

/* Roles */
.roles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.role-card { padding: 21px; }
.role-card__head { display: flex; align-items: center; gap: 12px; }
.role-symbol { display: grid; width: 39px; height: 39px; border-radius: 10px; color: #b46f00; background: #fff1d4; place-items: center; }
.role-card__head div { display: flex; flex-direction: column; }
.role-card h2 { margin: 0; font-size: 14px; }
.role-card__head span { color: #9ba1a8; font-size: 8px; }
.role-card > p { min-height: 38px; margin: 18px 0; color: #7d858e; font-size: 10px; }
.role-stats { display: flex; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #858c95; gap: 25px; font-size: 9px; }
.role-stats b { color: #343a40; }
.role-actions { display: flex; min-height: 55px; padding-top: 14px; align-items: center; gap: 8px; }
.role-actions form { margin: 0; }
.role-actions .button { min-height: 34px; font-size: 9px; }
.permission-editor { margin-top: 20px; }
.permission-editor form { padding: 24px; }
.permission-editor__block { margin: 0 0 22px; }
.permission-editor__block + .permission-editor__block {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.permission-editor__block .panel__header { padding: 0 0 14px; }
.permission-editor__block .panel__header h3 { margin: 0; font-size: 16px; }
.role-fields { margin-bottom: 18px; }
.permission-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.permission-groups fieldset { margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.permission-groups legend { padding: 0 6px; color: #5e6670; font-size: 10px; font-weight: 800; }
.permission-groups label { display: flex; padding: 8px 4px; align-items: center; gap: 9px; cursor: pointer; }
.permission-groups input { accent-color: var(--accent); }
.permission-groups label span { display: flex; flex-direction: column; }
.permission-groups b { font-size: 12px; font-weight: 700; }
.permission-groups small { color: #64748b; font-size: 11px; }
.role-notes { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.role-notes.is-on { background: #dcfce7; color: #15803d; }
.role-notes.is-off { background: #f1f5f9; color: #64748b; }
.perm-sheet { display: grid; gap: 14px; width: 100%; }
.perm-block { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
.perm-block > h3 { margin: 0; padding: 12px 16px; font-size: 14px; font-weight: 700; color: #0f172a; background: #f8fafc; border-bottom: 1px solid #e8edf3; }
.perm-grid { display: grid; width: 100%; grid-template-columns: minmax(180px, 1.6fr) repeat(4, minmax(92px, 1fr)); align-items: center; }
.perm-grid--notify { grid-template-columns: minmax(180px, 1fr) 110px; }
.perm-grid__h { padding: 9px 8px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; text-align: center; background: #fff; border-bottom: 1px solid #eef2f7; }
.perm-grid__h:first-child { text-align: left; padding-left: 16px; }
.perm-grid__name { padding: 11px 16px; font-size: 13px; font-weight: 650; color: #1e293b; border-top: 1px solid #f1f5f9; }
.perm-grid__cell { display: flex; justify-content: center; align-items: center; min-height: 40px; padding: 6px; border-top: 1px solid #f1f5f9; }
.perm-grid__more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 16px 12px; background: #f8fafc; border-top: 1px solid #f1f5f9; }
.perm-grid__more label { display: inline-flex !important; width: auto !important; flex-direction: row !important; align-items: center; gap: 8px; margin: 0; padding: 4px 10px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 650; color: #334155; cursor: pointer; }
.perm-miss { color: #cbd5e1; font-size: 16px; line-height: 1; }
.perm-grid input[type="checkbox"],
.perm-grid__more input[type="checkbox"] { width: 16px !important; height: 16px !important; min-width: 16px; margin: 0; padding: 0; accent-color: #0f766e; flex: 0 0 16px; }
.role-notify { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 16px; padding: 12px 14px; border: 1px solid #99f6e4; border-radius: 12px; background: #f0fdfa; }
.role-notify b { display: block; font-size: 14px; }
.role-notify small { display: block; margin-top: 2px; color: #475569; font-size: 12px; }

/* Modal ??????? ???????? ?????????????????????????? ????????????????????????????? ???????????? sticky-??????????????????????????, ???? ?????????????????????????????????????? ?????????????????????????/???????????????????? */
:root {
  --topbar-h: 76px;
  --modal-gap-top: 28px;
  --modal-gap-bottom: 28px;
  --modal-max-h: calc(100dvh - var(--topbar-h) - var(--modal-gap-top) - var(--modal-gap-bottom));
}
.modal {
  position: fixed;
  inset: auto;
  top: calc(var(--topbar-h) + var(--modal-gap-top));
  bottom: var(--modal-gap-bottom);
  left: 0;
  right: 0;
  width: min(92vw, 620px);
  max-width: calc(100vw - 24px);
  height: fit-content;
  max-height: var(--modal-max-h);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 28px 80px rgba(8, 12, 18, .28);
  overflow: hidden;
  color: inherit;
}
dialog.modal:not([open]) {
  display: none !important;
}
dialog.modal.modal--nested[open] {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10050 !important;
  background: rgba(8, 11, 16, .72) !important;
  pointer-events: auto !important;
}
dialog.modal.modal--nested[open] .modal__card {
  width: min(92vw, 620px);
  max-height: min(86dvh, 720px);
  overflow: auto;
}
.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modalIn .28s cubic-bezier(.2, .8, .2, 1);
}
.modal.is-closing {
  animation: modalOut .18s ease-in forwards;
}
.modal::backdrop {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(26, 168, 150, .12), transparent 50%),
    rgba(8, 11, 16, .72);
  backdrop-filter: blur(8px) saturate(1.1);
  animation: modalBackdropIn .25s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes modalOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(8px) scale(.98); }
}
@keyframes modalBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal__card {
  display: flex;
  flex-direction: column;
  max-height: var(--modal-max-h);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fffefb 0%, #fff 42%),
    #fff;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.modal__header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex: 0 0 auto;
  padding: 20px 22px 18px 26px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(26, 168, 150, .1), transparent 55%),
    #fff;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.modal__header > div { min-width: 0; }
.modal__header .eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.modal__header h2 {
  margin: 0;
  color: #15181c;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.modal__header > button,
.modal__header [data-modal-close] {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 1px solid #e6e9ed;
  border-radius: 11px;
  color: #6b7280;
  background: #fff;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.modal__header > button:hover,
.modal__header [data-modal-close]:hover {
  border-color: #d7dbe1;
  color: #111827;
  background: #f4f5f7;
  transform: translateY(-1px);
}
.modal__body {
  flex: 1 1 auto;
  padding: 18px 26px 8px;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
  min-width: 0;
}
.modal .form-grid {
  flex: 1 1 auto;
  padding: 22px 26px;
  overflow: visible;
}
.modal .form-actions,
.modal__footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 16px 22px 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.96), #fff);
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}
.modal__footer .button,
.modal .form-actions .button {
  margin: 0;
}
#plannedBatchLayoutModal .modal__footer,
.modal--batch-layout .modal__footer {
  padding: 14px 20px 16px;
  gap: 12px;
}
.modal--confirm .modal__card {
  text-align: left;
}
.modal--confirm .modal__body {
  padding: 8px 26px 6px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}
.modal--confirm .modal__body p {
  margin: 0 0 8px;
}
.modal--confirm .modal__body p:last-child {
  margin-bottom: 0;
}
.modal--confirm .modal__body .muted {
  color: #6b7280;
  font-size: 13px;
}
.modal--confirm .modal__body strong {
  color: #111827;
}
.modal--confirm .button--primary {
  border-color: var(--accent, #0d6e6e);
  color: #fff;
  background: var(--accent, #0d6e6e);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent, #0d6e6e) 28%, transparent);
}
.modal--confirm .button--danger {
  border-color: #b91c1c;
  color: #fff;
  background: #dc2626;
  box-shadow: 0 8px 18px rgba(220, 38, 38, .22);
}
.modal--confirm .button--danger:hover {
  background: #b91c1c;
}
/* ?????????????????????????????????????????????????????: ???????????????????????? showModal (top-layer ????????????????????????? ????????????????????????? ??????????????????????????????????) */
dialog#confirmModal:not([open]) {
  display: none !important;
}
dialog#confirmModal[open] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 0 !important;
  background: rgba(8, 11, 16, .55) !important;
  overflow: auto !important;
}
dialog#confirmModal[open] .modal__card {
  position: relative;
  z-index: 1;
  width: min(94vw, 420px) !important;
  max-height: min(80dvh, 520px);
  margin: auto;
  pointer-events: auto !important;
}
dialog#confirmModal[open] .form-actions,
dialog#confirmModal[open] [data-confirm-ok],
dialog#confirmModal[open] [data-modal-close] {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  position: relative;
  z-index: 2;
}
body.amo-modal-open .topbar .user-menu,
body.amo-modal-open .topbar .notify-menu,
.admin-body.is-android-app.amo-modal-open .topbar .user-menu,
.admin-body.is-android-app.amo-modal-open .topbar .notify-menu {
  visibility: hidden !important;
  pointer-events: none !important;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #6b7280;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
}
.live-pill.is-live {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}
.live-pill.is-live i {
  background: #22c55e;
  animation: livePulse 1.6s ease-out infinite;
}
.live-pill.is-stale {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}
.live-pill.is-stale i { background: var(--accent); }
.live-pill.is-update {
  border-color: #fcd34d;
  color: #92400e;
  background: #e6f7f4;
  cursor: pointer;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (max-width: 720px) {
  :root {
    --topbar-h: 64px;
    --modal-gap-top: 10px;
    --modal-gap-bottom: 12px;
  }
  .modal,
  .modal--sm,
  .modal--wide {
    width: min(100vw - 16px, 620px);
    max-height: var(--modal-max-h);
    border-radius: 14px;
  }
  .modal__card { border-radius: 14px; max-height: var(--modal-max-h); }
  .modal__header { padding: 16px 16px 14px 18px; }
  .modal .form-grid { padding: 16px 18px; }
  .modal .form-actions { padding: 14px 16px 16px; }
}
/* —— ОТК выпуск (компактный) —— */
.qc-release {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: none;
}
.qc-release__form {
  display: grid;
  gap: 10px;
  width: 100%;
}
.qc-card {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  animation: qcCardIn .22s ease both;
  box-sizing: border-box;
}
.qc-card--hero {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 48%);
}
.qc-card--entry {
  border-color: #b7e4db;
  background: linear-gradient(180deg, #f7fffd 0%, #fff 36%);
}
.qc-card--muted {
  background: #fbfcfe;
}
.qc-card__head {
  margin-bottom: 8px;
}
.qc-card__head--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.qc-card__head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  color: #0f172a;
}
.qc-card__hint {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.qc-card__hint--flush {
  margin-top: 6px;
}
.qc-card__hint b {
  color: #334155;
  font-weight: 700;
}
.qc-remain-badge {
  display: grid;
  gap: 1px;
  min-width: 110px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  text-align: right;
  flex-shrink: 0;
}
.qc-remain-badge span {
  font-size: 10px;
  color: #64748b;
}
.qc-remain-badge b {
  font-size: 14px;
  font-weight: 800;
  color: #1d4ed8;
}
@keyframes qcCardIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .qc-card { animation: none; }
}
.qc-hero {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.qc-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.qc-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #eef2f7;
  color: #475569;
}
.qc-pill--qc_pending { background: #fff7ed; color: #c2410c; }
.qc-pill--qc_in_progress { background: #eff6ff; color: #1d4ed8; }
.qc-pill--rework { background: #fef3c7; color: #a16207; }
.qc-pill--done { background: #ecfdf5; color: #047857; }
.qc-pill--warn { background: #fef2f2; color: #b91c1c; }
.qc-hero__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
}
.qc-hero__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 4px 0 0;
  color: #64748b;
  font-size: 11px;
}
.qc-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #d7dee7;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.qc-link-btn:hover { border-color: #94a3b8; }
.qc-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e8edf3;
}
.qc-meta > span,
.qc-meta__weight {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
  color: #0f172a;
}
.qc-meta em {
  font-style: normal;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 650;
}
.qc-meta__weight.qc-field {
  padding: 6px 8px;
  margin: 0;
}
.qc-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  width: 100%;
}
.qc-progress__item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e8edf3;
  background: #fff;
  min-width: 0;
}
.qc-progress__item span {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 650;
}
.qc-progress__item b {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.qc-progress__item.is-accent {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.qc-progress__item.is-accent b { color: #1d4ed8; }
.qc-progress__item.is-warn {
  border-color: #fecaca;
  background: #fff8f7;
}
.qc-progress__item.is-warn b { color: #b91c1c; }
.qc-setup-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.qc-setup-chip {
  display: grid;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.qc-setup-chip strong { font-size: 11px; color: #0f172a; }
.qc-setup-chip span { font-size: 12px; color: #334155; }
.qc-setup-chip small { font-size: 10px; color: #94a3b8; }
.qc-fact-table { width: 100%; }
.qc-fact-table table { width: 100%; font-size: 12px; }
.qc-fact-table tr.is-scrap td { background: #fff8f7; }

.qc-setup-scrap-list {
  display: grid;
  gap: 8px;
}
.qc-setup-scrap-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 160px);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.qc-setup-scrap-row__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.qc-setup-scrap-row__meta strong {
  font-size: 13px;
  color: #0f172a;
}
.qc-setup-scrap-row__meta small {
  font-size: 12px;
  color: #64748b;
}
.qc-setup-scrap-row .qc-field {
  margin: 0;
}
@media (max-width: 640px) {
  .qc-setup-scrap-row {
    grid-template-columns: 1fr;
  }
}

.qc-disp {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.qc-disp__cell {
  min-width: 0;
}
.qc-disp__cell--result .qc-field {
  background: #f0fdf9;
  border-color: #a7f3d0;
}
.qc-field {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 10px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
.qc-field--wide {
  margin-top: 8px;
}
.qc-field--compact {
  gap: 3px;
}
.qc-field__label {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}
.qc-field__input {
  width: 100%;
  margin: 0 !important;
  padding: 7px 28px 7px 10px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  min-height: 36px;
}
.qc-field__input:focus {
  outline: none !important;
  border-color: #14a08d !important;
  box-shadow: 0 0 0 2px rgba(20, 160, 141, 0.14) !important;
}
.qc-field__input--ok {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #047857 !important;
}
.qc-field__input--warn:focus {
  border-color: #f04438 !important;
  box-shadow: 0 0 0 2px rgba(240, 68, 56, 0.12) !important;
}
.qc-field select.qc-field__input {
  font-size: 13px !important;
  font-weight: 650 !important;
  padding-right: 28px !important;
}
.qc-field textarea.qc-field__input {
  font-size: 12px !important;
  font-weight: 500 !important;
  min-height: 56px;
  resize: vertical;
  padding: 8px 10px !important;
}
.qc-field input[type="text"].qc-field__input {
  font-size: 13px !important;
  font-weight: 550 !important;
  padding-right: 10px !important;
}
.qc-field--compact .qc-field__input {
  font-size: 13px !important;
  min-height: 32px;
  padding: 5px 8px !important;
}
.qc-field__unit {
  position: absolute;
  right: 18px;
  bottom: 15px;
  font-size: 11px;
  font-weight: 650;
  color: #94a3b8;
  pointer-events: none;
}
.qc-field--wide .qc-field__unit { display: none; }

.qc-entry-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 2px;
}
.qc-scrap-source {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff8f7;
}
.qc-scrap-source[hidden] {
  display: none !important;
}
.qc-scrap-source__title {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #912018;
}
.qc-executors {
  margin-top: 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.qc-executors--modal {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.qc-executors__head {
  margin-bottom: 6px;
}
.qc-executors__title {
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #475569;
}
.qc-executors__grid {
  display: grid;
  grid-template-columns: repeat(var(--qc-exec-cols, 2), minmax(0, 1fr));
  gap: 6px;
}
.qc-exec-slot {
  min-width: 0;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #e8edf3;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.qc-exec-slot__label {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .02em;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-exec-slot.is-scrap-focus {
  border-color: #fecaca;
  background: #fff8f7;
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.08);
}
.qc-exec-slot.is-scrap-focus .qc-exec-slot__label {
  color: #912018;
}
.qc-exec-slot.is-scrap-focus .qc-maker:has(input:checked) {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.22);
}
.qc-exec-slot.is-scrap-focus .qc-maker input {
  accent-color: #ef4444;
}
.qc-exec-cell {
  display: grid;
  gap: 2px;
  font-size: 12px;
  line-height: 1.25;
  color: #334155;
}
.qc-exec-cell em {
  display: inline-block;
  min-width: 12px;
  margin-right: 2px;
  font-style: normal;
  font-weight: 700;
  color: #94a3b8;
}
.qc-exec-cell .is-scrap {
  color: #912018;
}
.qc-exec-cell .is-scrap em {
  color: #ef4444;
}
@media (max-width: 900px) {
  .qc-executors__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .qc-executors__grid {
    grid-template-columns: 1fr;
  }
}
.qc-maker-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 0;
}
.qc-maker-list--compact {
  gap: 3px;
}
.qc-scrap-source .qc-maker-list {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  margin-top: 4px;
}
.qc-maker {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 10px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.qc-maker--compact {
  gap: 6px;
  padding: 5px 7px;
  border-radius: 6px;
  align-items: center;
}
.qc-maker:hover {
  border-color: #94a3b8;
}
.qc-maker:has(input:checked) {
  border-color: #14a08d;
  background: #f0fdfa;
  box-shadow: 0 0 0 1px rgba(20, 160, 141, 0.25);
}
.qc-maker--scrap:has(input:checked) {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.22);
}
.qc-maker input {
  margin-top: 2px;
  accent-color: #14a08d;
  flex: 0 0 auto;
}
.qc-maker--compact input {
  margin-top: 0;
}
.qc-maker--scrap input {
  accent-color: #ef4444;
}
.qc-maker__body {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.qc-maker--compact .qc-maker__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}
.qc-maker__body strong { color: #0f172a; font-size: 12px; }
.qc-maker--compact .qc-maker__body strong { font-size: 11px; line-height: 1.2; }
.qc-maker__body em { font-style: normal; color: #64748b; font-size: 11px; }
.qc-maker--compact .qc-maker__body em { font-size: 10px; }
.qc-maker__body small { color: #94a3b8; font-size: 10px; }
.qc-maker--compact .qc-maker__body small { font-size: 10px; }
.qc-empty-hint {
  margin: 0;
  color: #94a3b8;
  font-size: 11px;
}
.qc-inline-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}
.qc-inline-toggle.is-open { color: #0f766e; }
.qc-rework-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.qc-rework-grid .qc-field--wide {
  grid-column: 1 / -1;
  margin-top: 0;
}
.qc-disp-scrap[hidden],
.qc-batch-attr[hidden] {
  display: none !important;
}
.qc-release .qc-decision-bar {
  width: 100%;
  margin-top: 2px;
  padding: 10px 0 0;
  border-top: 1px solid #e8edf3;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(248,250,252,0), #f8fafc 28%);
  z-index: 5;
}
.qc-btn--apply {
  min-width: 160px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 750;
}
.qc-checklist {
  font-size: 12px;
}
@media (max-width: 900px) {
  .qc-disp,
  .qc-meta,
  .qc-rework-grid {
    grid-template-columns: 1fr;
  }
  .qc-card__head--split,
  .qc-hero {
    flex-direction: column;
  }
  .qc-remain-badge {
    text-align: left;
    width: 100%;
  }
  .qc-maker-list {
    grid-template-columns: 1fr;
  }
}

.qc-form-grid {
  gap: 12px;
}
.qc-form-grid label a.form-hint {
  margin-top: 4px;
  display: inline-block;
  color: #1d4ed8;
  font-weight: 650;
  text-decoration: none;
}
.qc-form-grid label a.form-hint:hover {
  text-decoration: underline;
}
.qc-block-title {
  padding-top: 8px;
  border-top: 1px solid #eef1f5;
}
.qc-block-title h3 {
  margin: 0;
  font-size: 14px;
  color: #334155;
}
.qc-setup-table th {
  white-space: nowrap;
}
.qc-setup-table td input[type="number"],
.qc-setup-table td input[type="text"] {
  min-width: 110px;
}
.qc-machines-label {
  display: block;
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.qc-machines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.qc-machine {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(26, 168, 150, .08), transparent 42%),
    #fbfcfe;
}
.qc-machine--empty {
  color: #94a3b8;
  font-size: 13px;
}
.qc-machine__setup {
  display: grid;
  gap: 2px;
}
.qc-machine__setup b {
  color: #0f172a;
  font-size: 13px;
}
.qc-machine__setup span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.qc-machine__machine {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.qc-machine__machine small {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.qc-machine__machine strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}
.qc-machine__machine em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}
.qc-decision-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 16px 8px 4px;
  border-top: 1px solid #e8ecf1;
  flex-wrap: wrap;
}
.qc-decision-bar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}
.qc-btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.qc-btn:hover {
  transform: translateY(-1px);
}
.qc-btn--rework {
  color: #9a3412;
  border: 1px solid #fdba74;
  background: linear-gradient(180deg, #e6f7f4 0%, #d5f3ee 100%);
  box-shadow: 0 8px 18px rgba(234, 88, 12, .12);
}
.qc-btn--rework:hover {
  border-color: #fb923c;
  background: linear-gradient(180deg, #d5f3ee 0%, #a7e4db 100%);
}
.qc-btn--close {
  color: #14532d;
  border: 1px solid #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  box-shadow: 0 8px 18px rgba(22, 163, 74, .14);
}
.qc-btn--close:hover {
  border-color: #4ade80;
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
}
.qc-btn--save {
  color: #1e3a8a;
  border: 1px solid #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
}
.qc-btn--save:hover {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
}
.qc-btn--apply {
  color: #fff;
  border: 1px solid #0f8f7e;
  background: linear-gradient(180deg, #1aa896 0%, #0f8f7e 100%);
  box-shadow: 0 8px 18px rgba(26, 168, 150, .22);
}
.qc-btn--apply:hover {
  border-color: #0d7a6d;
  background: linear-gradient(180deg, #1dbda8 0%, #0f8f7e 100%);
}
.qc-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #d7e2df;
}
.qc-closed-banner {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  font-weight: 600;
}
.qc-toggle-btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
}
.qc-toggle-btn.is-open {
  border-color: var(--accent);
  background: #fff8eb;
}
.qc-collapse {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fbfcfe;
}
.qc-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.qc-entry-head h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #0f172a;
}
.qc-entry-lead {
  margin: 0;
  max-width: 52rem;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.qc-disp-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.qc-disp-context > div {
  display: grid;
  gap: 2px;
  min-width: 110px;
  padding: 8px 12px;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fff;
}
.qc-disp-context span {
  font-size: 11px;
  color: #94a3b8;
}
.qc-disp-context b {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.qc-disp-context .is-accent {
  border-color: #c7d7fe;
  background: #f8faff;
}
.qc-disp-context .is-accent b {
  color: #1d4ed8;
}
.qc-disp-context .is-warn {
  border-color: #f3c6c2;
  background: #fff8f7;
}
.qc-disp-context .is-warn b {
  color: #b42318;
}
.qc-disp-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
}
.qc-disp-form__title,
.qc-disp-scrap__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.qc-disp-form__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.qc-disp-form__note {
  grid-column: 1 / -1;
}
.qc-disp-form input[readonly] {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}
.qc-disp-balance {
  margin: 0;
}
.qc-disp-scrap {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed #e8edf3;
}
.qc-batch-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.qc-batch-summary__item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fff;
}
.qc-batch-summary__item span {
  font-size: 11px;
  color: #94a3b8;
}
.qc-batch-summary__item strong {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.qc-batch-summary__item.is-accent {
  border-color: #c7d7fe;
  background: #f8faff;
}
.qc-batch-summary__item.is-accent strong {
  color: #1d4ed8;
}
.qc-batch-summary__item.is-warn {
  border-color: #f3c6c2;
  background: #fff8f7;
}
.qc-batch-summary__item.is-warn strong {
  color: #b42318;
}
.qc-batch-op-scrap {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #f3c6c2;
  border-radius: 10px;
  background: #fff8f7;
}
.qc-batch-op-scrap__title {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #912018;
}
.qc-batch-op-scrap ul {
  margin: 0;
  padding-left: 18px;
  color: #7a271a;
  font-size: 13px;
}
.qc-batch-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
}
.qc-batch-form__title,
.qc-batch-attr__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.qc-batch-form__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.qc-batch-form__note {
  grid-column: 1 / -1;
}
.qc-batch-attr {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed #e8edf3;
}
@media (max-width: 900px) {
  .qc-batch-summary,
  .qc-disp-form__grid,
  .qc-batch-form__grid {
    grid-template-columns: 1fr;
  }
}
.qc-entry-head__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.qc-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.qc-icon-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.qc-icon-btn--danger {
  color: #b42318;
  border-color: #f3c6c2;
}
.qc-icon-btn--danger:hover {
  background: #fef3f2;
  border-color: #f04438;
  color: #912018;
}
.qc-entry-rows {
  display: grid;
  gap: 12px;
}
.qc-entry-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(280px, 1.2fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
}
.qc-entry-row--has-op-scrap {
  border-color: #f3c6c2;
  background: linear-gradient(180deg, #fff8f7 0%, #fff 48%);
}
.qc-entry-fact,
.qc-entry-otk {
  display: grid;
  gap: 8px;
  align-content: start;
}
.qc-entry-fact__title,
.qc-entry-otk__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.qc-entry-fact__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eef2f7;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
}
.qc-entry-fact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}
.qc-entry-fact__grid > div {
  min-width: 0;
}
.qc-entry-fact__grid dt {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
}
.qc-entry-fact__grid dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}
.qc-entry-fact__scrap {
  color: #b42318;
}
.qc-entry-otk {
  padding-left: 14px;
  border-left: 1px dashed #e8edf3;
}
.qc-entry-otk__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.qc-entry-row__note {
  grid-column: 1 / -1;
}
.qc-attr-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding-top: 4px;
}
.qc-attr-block__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px) {
  .qc-attr-block__grid {
    grid-template-columns: 1fr;
  }
  .qc-entry-row {
    grid-template-columns: 1fr;
  }
  .qc-entry-otk {
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px dashed #e8edf3;
  }
  .qc-entry-otk__grid,
  .qc-entry-fact__grid {
    grid-template-columns: 1fr;
  }
}
.qc-check-actions {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.qc-check-actions__btns {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.qc-rework-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qc-rework-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
@media (max-width: 900px) {
  .qc-rework-grid {
    grid-template-columns: 1fr;
  }
}
/* .checkbox / .checkbox-field ??????? ????????. ???????????????? ????????????????? ?????????????????? */
.admin-footer { display: flex; min-height: 60px; padding: 15px 34px; border-top: 1px solid var(--line); color: #9298a0; background: #fff; align-items: center; justify-content: space-between; gap: 20px; font-size: 8px; }
.admin-footer > div { display: flex; gap: 18px; }
.admin-footer > div span { display: flex; align-items: center; gap: 6px; }

@media (max-width: 1150px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .entity-summary { grid-template-columns: repeat(2, 1fr); }
  .month-summary { grid-template-columns: repeat(2, 1fr); }
  .roles-grid { grid-template-columns: repeat(2, 1fr); }
  .machine-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid, .schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-groups { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .auth-shell { display: block; }
  .auth-visual { display: none; }
  .auth-app-download--form { display: inline-flex; }
  .auth-form-wrap { min-height: 100vh; }
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar__title { margin-left: 12px; }
  .breadcrumbs { margin-right: 0; }
  .dashboard-grid, .dashboard-grid--wide { grid-template-columns: 1fr; }
  .production-strip { grid-template-columns: 1fr 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .settings-tabs { display: grid; grid-template-columns: repeat(4, 1fr); }
  .settings-tabs button small { display: none; }
}
/* Schedules redesign */
.schedules-mini-stats { display: grid; margin-bottom: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.schedules-mini-stats.omd-mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.schedules-mini-stats article { display: flex; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; flex-direction: column; justify-content: center; gap: 2px; }
.schedules-mini-stats small { color: #8a9199; font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.schedules-mini-stats strong { color: #2f353b; font-size: 14px; }
.schedules-hint { display: flex; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #c5ebe4; border-radius: 10px; background: #f0faf8; align-items: flex-start; gap: 12px; }
.schedules-hint span { color: var(--accent-dark); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.schedules-hint p { margin: 0; color: #6d5a33; font-size: 11px; line-height: 1.4; }
.schedules-calendar-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.schedules-compact { overflow: hidden; }
.schedules-compact__toolbar { display: flex; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; gap: 10px; }
.schedules-compact__month { display: flex; align-items: center; gap: 8px; }
.schedules-compact__month b { display: block; color: #2f353b; font-size: 13px; }
.schedules-compact__month a { color: #8a9199; text-decoration: none; font-size: 9px; }
.schedules-compact__toolbar select { height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 9px; }
.schedules-compact__weekdays { display: grid; padding: 0 8px; border-bottom: 1px solid #eef1f4; background: #fafbfb; grid-template-columns: repeat(7, 1fr); }
.schedules-compact__weekdays span { padding: 8px 0; color: #8a9199; text-align: center; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.schedules-compact__grid { display: grid; padding: 8px; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.schedules-day { display: flex; min-height: 54px; padding: 6px; border: 1px solid transparent; border-radius: 8px; background: #fff; flex-direction: column; align-items: flex-start; gap: 4px; cursor: pointer; text-align: left; }
.schedules-day--blank { pointer-events: none; background: transparent; }
.schedules-day.is-weekend { background: #fafbfc; }
.schedules-day.is-today { border-color: #5ec4b6; background: #f0faf8; }
.schedules-day.is-selected { border-color: #2f353b; box-shadow: inset 0 0 0 1px #2f353b; }
.schedules-day:hover:not(.schedules-day--blank) { background: #f7f8f9; }
.schedules-day__num { color: #5f6670; font-size: 11px; font-weight: 700; }
.schedules-day.is-today .schedules-day__num { color: var(--accent-dark); }
.schedules-day__count { display: inline-grid; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; color: #fff; background: #6d747d; place-items: center; font-size: 8px; font-weight: 800; }
.schedules-day__dots { display: flex; gap: 3px; }
.schedules-day__dots i { width: 6px; height: 6px; border-radius: 50%; background: #4f8fdc; }
.schedules-day__dots i.dot-team { background: #8b5fbf; }
.schedules-day__dots i.shift-2 { outline: 1px solid #2f9d6a; outline-offset: 1px; }
.schedules-compact__legend { display: flex; padding: 10px 14px 12px; border-top: 1px solid #eef1f4; flex-wrap: wrap; align-items: center; gap: 12px; }
.schedules-compact__legend span { display: inline-flex; color: #8a9199; align-items: center; gap: 5px; font-size: 8px; }
.schedules-compact__legend i { width: 8px; height: 8px; border-radius: 2px; }
.schedules-day-panel { min-height: 320px; }
.schedules-day-panel__head { display: flex; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; gap: 10px; }
.schedules-day-panel__head small { display: block; color: #8a9199; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.schedules-day-panel__head h2 { margin: 2px 0 0; font-size: 16px; }
.schedules-day-panel__head b { display: grid; min-width: 28px; height: 28px; border-radius: 8px; color: var(--accent-dark); background: #d5f3ee; place-items: center; font-size: 12px; }
.schedules-day-panel__list { display: flex; padding: 12px; flex-direction: column; gap: 8px; }
.schedules-assign-row { display: flex; min-height: 52px; padding: 10px; border: 1px solid #e8ebef; border-left-width: 3px; border-radius: 8px; background: #f7fbff; align-items: center; gap: 10px; }
.schedules-assign-row.assignment-chip--team { border-left-color: #8b5fbf; background: #f8f4ff; }
.schedules-assign-row.assignment-chip--user { border-left-color: #4f8fdc; }
.schedules-assign-row__shift { display: grid; width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; color: #332000; background: var(--accent); place-items: center; font-size: 9px; font-weight: 800; }
.schedules-assign-row > div { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.schedules-assign-row b { color: #2f353b; font-size: 11px; }
.schedules-assign-row small { color: #8a9199; font-size: 9px; }
.schedules-assign-row em { color: #6d747d; font-size: 9px; font-style: normal; }
.schedules-assign-row form { margin: 0; }
.schedules-assign-row button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; color: #a54a5a; background: #fff0f2; cursor: pointer; }

@media (max-width: 980px) {
  .schedules-calendar-layout { grid-template-columns: 1fr; }
  .schedules-mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .schedules-mini-stats { grid-template-columns: 1fr 1fr; }
}
.schedule-card--v2 { position: relative; overflow: hidden; min-height: 360px; border: 1px solid #e6ebf0; background: linear-gradient(180deg, #fff 0%, #fafbfc 100%); box-shadow: 0 10px 26px rgba(24, 30, 38, .04); }
.schedule-card--v2::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #5ec4b6); content: ""; }
.schedule-card__metrics { display: grid; margin-top: 14px; grid-template-columns: 1fr 1fr; gap: 8px; }
.schedule-card__metrics div { display: flex; min-height: 58px; padding: 10px 12px; border: 1px solid #eef1f4; border-radius: 9px; background: #fff; flex-direction: column; justify-content: center; gap: 3px; }
.schedule-card__metrics small { color: #8a9199; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.schedule-card__metrics strong { color: #2f353b; font-size: 12px; }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.table-actions form { margin: 0; }

/* Notifications */
.notify-menu { position: relative; z-index: 45; }
.notify-menu .icon-button.has-unread i[data-notify-badge]:not(:empty) { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; color: #fff; background: #d65b69; font-size: 8px; font-style: normal; font-weight: 800; line-height: 16px; }
.app-update-btn {
  position: relative;
  flex: 0 0 auto;
}
.app-update-btn svg {
  display: block;
}
.app-update-btn [data-app-update-dot] {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e23c4a;
  box-shadow: 0 0 0 2px var(--surface, #fff);
}
.app-update-btn.has-update [data-app-update-dot] {
  display: block !important;
  animation: monPulse 1.4s ease-out infinite;
}
.app-update-bar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px 0;
}
.notify-dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; width: min(360px, 82vw); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 40px rgba(20, 24, 30, .16); }
.notify-dropdown[hidden] { display: none !important; }
.notify-dropdown--portal {
  position: fixed !important;
  top: calc(56px + env(safe-area-inset-top, 0px)) !important;
  right: 8px !important;
  left: 8px !important;
  width: auto !important;
  max-width: none !important;
  max-height: min(70dvh, 420px) !important;
  z-index: 1200 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.notify-dropdown--portal[hidden] { display: none !important; }
.notify-dropdown--portal .notify-dropdown__list {
  max-height: none;
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.notify-dropdown__head { display: flex; padding: 12px 14px; border-bottom: 1px solid #eef0f2; align-items: center; justify-content: space-between; gap: 10px; }
.notify-dropdown__head b { font-size: 11px; }
.notify-dropdown__head button { border: 0; color: var(--accent-dark); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.notify-dropdown__list { max-height: 340px; overflow: auto; }
.notify-item { display: flex; padding: 12px 14px; border-bottom: 1px solid #f2f4f6; flex-direction: column; gap: 3px; text-decoration: none; }
.notify-item:hover { background: #fafbfc; }
.notify-item.is-unread { background: #f0faf8; }
.notify-item b { color: #2f353b; font-size: 10px; }
.notify-item span { color: #6d747d; font-size: 9px; }
.notify-item small { color: #9aa0a7; font-size: 8px; }

/* Incidents */
.incident-filters { display: flex; margin-bottom: 14px; flex-wrap: wrap; align-items: center; gap: 8px; }
.incident-filters a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: #6d747d; background: #fff; text-decoration: none; font-size: 9px; font-weight: 700; }
.incident-filters a.active { border-color: #efc57a; color: var(--accent-dark); background: #fff8ea; }
.incident-status { display: inline-flex; padding: 4px 8px; border-radius: 6px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.incident-status--new { color: #8a4b00; background: #ffe8bf; }
.incident-status--in_progress { color: #1f4f8a; background: #e7f1ff; }
.incident-status--long_term { color: #6b3fa0; background: #f1e8ff; }
.incident-status--done { color: #176848; background: #e5f7ee; }
.incident-table { width: 100%; table-layout: fixed; }
.incident-table th,
.incident-table td { white-space: normal; word-break: break-word; vertical-align: top; }
.incident-table th:nth-child(1),
.incident-table td:nth-child(1) { width: 52px; }
.incident-table th:nth-child(5),
.incident-table td:nth-child(5) { width: 110px; }
.incident-table th:nth-child(8),
.incident-table td:nth-child(8) { width: 110px; }
.incident-table .entity-name b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.incident-detail__photos,
.incident-detail__notes { margin: 0 26px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; }
.incident-detail__photos small,
.incident-detail__notes small { display: block; margin-bottom: 8px; color: #8a9199; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.incident-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.incident-photo { display: block; aspect-ratio: 1; border: 1px solid #e5e8ec; border-radius: 8px; overflow: hidden; background: #fff; }
.incident-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.incident-notes-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
.incident-notes-empty { margin: 0; color: #8a9199; font-size: 10px; }
.incident-note { padding: 10px 12px; border: 1px solid #e8ebef; border-radius: 8px; background: #fff; }
.incident-note header { display: flex; margin-bottom: 4px; align-items: baseline; justify-content: space-between; gap: 10px; }
.incident-note b { color: #2f353b; font-size: 10px; }
.incident-note span { color: #8a9199; font-size: 8px; white-space: nowrap; }
.incident-note p { margin: 0; color: #3a4148; font-size: 11px; white-space: pre-wrap; }
.incident-note-form { display: grid; margin-top: 10px; gap: 10px; }
.incident-note-form .button { justify-self: start; }

/* Create incident form */
.modal--incident { width: min(94vw, 560px); }
.modal--incident .modal__card { overflow: hidden; }
.incident-create__body {
  flex: 1 1 auto;
  padding: 18px 22px 8px;
  overflow: auto;
  display: grid;
  gap: 16px;
}
.incident-create__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.incident-create__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #555c65;
  font-size: 10px;
  font-weight: 700;
}
.incident-create__field--wide { grid-column: 1 / -1; }
.incident-create__field select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #e3e6ea;
  border-radius: 12px;
  outline: none;
  color: #22272d;
  background: #fff;
  font-size: 13px;
}
.incident-create__field select:focus {
  border-color: #d4a24a;
  box-shadow: 0 0 0 3px rgba(212, 162, 74, .12);
}
.incident-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 12px;
  border: 1px solid #e8ebef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfcfd 0%, #f7f8fa 100%);
}
.incident-compose__label {
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.incident-compose textarea {
  width: 100%;
  min-height: 104px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  resize: vertical;
  color: #1f2937;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
}
.incident-compose textarea:focus {
  border-color: #d4a24a;
  box-shadow: 0 0 0 3px rgba(212, 162, 74, .12);
}
.incident-compose textarea::placeholder {
  color: #9ca3af;
}
.incident-compose__hint {
  margin: 0;
  color: #9aa1a9;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}
.incident-compose--note {
  padding: 12px;
  background: #fff;
}
.incident-compose--note textarea {
  min-height: 84px;
}
.incident-photos {
  padding: 14px;
  border: 1px dashed #d7dce3;
  border-radius: 14px;
  background: #fafbfc;
}
.incident-photos__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.incident-photos__title {
  display: block;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}
.incident-photos__head small {
  display: block;
  margin-top: 2px;
  color: #9aa1a9;
  font-size: 11px;
}
.incident-photos__head b {
  color: #6b7280;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.incident-photos__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.incident-photos__actions .button {
  min-height: 40px;
}
.incident-photos__preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.incident-photos__thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid #e5e8ec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.incident-photos__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.incident-photos__thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, .72);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.incident-photos__empty {
  margin: 0;
  color: #9aa1a9;
  font-size: 12px;
  line-height: 1.4;
}
.incident-create__note {
  margin: 0;
  color: #8b929b;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .incident-create__grid { grid-template-columns: 1fr; }
  .incident-create__field--wide { grid-column: auto; }
  .incident-photos__actions .button { flex: 1 1 calc(50% - 4px); }
  .incident-compose textarea { min-height: 120px; font-size: 16px; }
}

.data-table tr.is-highlight td { background: #fff8ea; }
.incident-stats-grid { display: grid; margin-bottom: 18px; grid-template-columns: 1fr 1fr; gap: 16px; }
.incident-status-bars { display: flex; padding: 8px 20px 18px; flex-direction: column; gap: 12px; }
.incident-status-bars > div > div { display: flex; margin-bottom: 6px; align-items: center; justify-content: space-between; gap: 10px; }
.incident-status-bars span { color: #6d747d; font-size: 9px; }
.incident-status-bars b { color: #2f353b; font-size: 10px; }
.incident-bar { display: block; height: 8px; border-radius: 999px; background: #eef1f4; overflow: hidden; }
.incident-bar::after { display: block; width: var(--p); height: 100%; content: ""; }
.incident-bar--new::after { background: #f0a429; }
.incident-bar--in_progress::after { background: #4f8fdc; }
.incident-bar--long_term::after { background: #8b5fbf; }
.incident-bar--done::after { background: #2f9d6a; }
.incident-day-list { display: flex; padding: 8px 20px 18px; flex-direction: column; gap: 8px; }
.incident-day-list > div { display: grid; grid-template-columns: 42px 1fr 28px; align-items: center; gap: 10px; }
.incident-day-list span { color: #858d96; font-size: 8px; }
.incident-day-list i { display: block; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #f0a429, #f6c76a); }
.incident-day-list b { color: #2f353b; text-align: right; font-size: 10px; }
.incident-row { cursor: pointer; }
.incident-row:hover td { background: #f0faf8; }
.incident-detail__status {
  display: flex;
  margin: 0 26px 14px;
  padding: 14px 16px;
  border: 1px solid #c5ebe4;
  border-radius: 10px;
  background: #f0faf8;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.incident-detail__timers {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.incident-detail__timer { text-align: right; min-width: 120px; }
.incident-detail__timer small {
  display: block;
  color: #8d7a4d;
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.incident-detail__timer strong {
  display: block;
  color: var(--accent-dark);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.incident-detail__timer em {
  display: block;
  margin-top: 2px;
  color: #9a8456;
  font-size: 10px;
  font-style: normal;
}
.incident-detail__timer.is-live strong { color: var(--accent-dark); }
.incident-detail__timer.is-done strong { color: #166534; }
@media (max-width: 720px) {
  .incident-detail__status { align-items: flex-start; }
  .incident-detail__timers { width: 100%; justify-content: stretch; }
  .incident-detail__timer { flex: 1 1 140px; text-align: left; }
}
.incident-detail__desc { margin: 0 26px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; }
.incident-detail__desc small { display: block; margin-bottom: 6px; color: #8a9199; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.incident-detail__desc p { margin: 0; color: #3a4148; font-size: 11px; white-space: pre-wrap; }
.incident-detail__wiki { margin: 0 26px 12px; padding: 12px 14px; border: 1px solid #e7ebf0; border-radius: 9px; background: #fff; }
.incident-detail__wiki small { display: block; margin-bottom: 8px; color: #8a9199; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.incident-wiki-list { display: flex; flex-direction: column; gap: 6px; }
.incident-wiki-link {
  display: block;
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f7f8fa;
}
.incident-wiki-link:hover { background: #eef2f6; color: var(--accent); }
.incident-detail__actions { flex-wrap: wrap; }
.incident-detail__actions form { margin: 0; }
.incident-assign-form {
  display: grid;
  margin: 0 26px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfb;
  gap: 10px;
}
.incident-assign-form[hidden] { display: none !important; }
.incident-assign-form .incident-create__field { margin: 0; }
.incident-assign-form select { width: 100%; }
.incident-assign-form {
  display: grid;
  margin: 0 26px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfb;
  gap: 10px;
}
.incident-assign-form[hidden] { display: none !important; }
.incident-assign-form .incident-create__field { margin: 0; }
.incident-assign-form select { width: 100%; }

@media (max-width: 900px) {
  .incident-stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .admin-content { padding: 24px 16px 40px; }
  .topbar { height: 64px; padding: 0 14px; }
  .system-time, .user-menu div { display: none; }
  .user-menu { min-width: auto; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .profile-hero { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .profile-meta { width: 100%; padding-top: 16px; padding-left: 0; border-top: 1px solid #343a42; border-left: 0; }
  .stat-grid, .roles-grid, .form-grid, .permission-groups, .entity-summary, .machine-tiles, .team-grid, .schedule-grid { grid-template-columns: 1fr; }
  .month-summary { grid-template-columns: 1fr; }
  .member-selector__grid { grid-template-columns: 1fr; }
  .member-selector--roles { grid-template-columns: 1fr; }
  .schedule-preview { align-items: stretch; flex-direction: column; }
  .schedule-preview > span { display: none; }
  .cycle-fields { grid-template-columns: 1fr; }
  .period-row { grid-template-columns: 20px 1fr 1fr 28px; }
  .period-row select { grid-column: 2 / 4; }
  .period-row [name="period_description[]"] { grid-column: 2 / 4; }
  .field-full { grid-column: auto; }
  .settings-tabs { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 110px; }
  .production-strip { grid-template-columns: 1fr; }
  .production-strip a { border-top: 1px solid #30363e; border-left: 0; }
  .admin-footer { align-items: flex-start; flex-direction: column; }
  .admin-footer > div { flex-wrap: wrap; }
  .auth-form-wrap { padding: 20px; }
  .auth-card { padding: 30px 24px; }
  .install-card { padding: 26px 20px; }
}

/* ===== Monitoring ===== */
.mon-page--cmd {
  gap: 12px;
}
.mon-page--cmd > * { min-width: 0; }
.mon-page--cmd > .mon-hero { order: 0; }
.mon-page--cmd > .mon-subnav { order: 1; }
.mon-page--cmd > #mon-overview { order: 2; }
.mon-page--cmd > #mon-floor { order: 3; }
.mon-page--cmd > .mon-alert-panel { order: 4; }
.mon-page--cmd > .mon-extra-panel { order: 5; }
.mon-page--cmd > #mon-events { order: 6; }
.mon-page--cmd > #mon-efficiency { order: 10; }
.mon-page--cmd > #mon-analytics { order: 11; }
.mon-page--cmd > #mon-director { order: 12; }
.mon-page--cmd > #mon-people { order: 13; }
.mon-page--cmd > #mon-quality { order: 14; }
.mon-page--cmd > #mon-qms { order: 15; }

.mon-page--cmd .mon-section {
  scroll-margin-top: 64px;
  gap: 10px;
}
.mon-page--cmd .mon-section__head h2 {
  font-size: 16px;
  letter-spacing: -.02em;
}
.mon-page--cmd .mon-section__head p {
  margin-top: 2px;
  font-size: 12px;
}
.mon-page--cmd .mon-hero {
  border-radius: 14px;
}
.mon-page--cmd .mon-hero__inner {
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  padding: 12px 16px;
}
.mon-page--cmd .mon-hero__title-row { margin-bottom: 2px; }
.mon-page--cmd .mon-hero h1 {
  font-size: clamp(18px, 2.2vw, 22px);
}
.mon-page--cmd .mon-hero__meta { margin: 2px 0 0; font-size: 12px; }
.mon-page--cmd .mon-hero__toolbar,
.mon-page--cmd .mon-filter {
  padding: 10px 12px;
  border-radius: 14px;
  gap: 8px;
  width: min(740px, 100%);
}
.mon-page--cmd .mon-hero .mon-tool select { height: 32px; min-width: 100px; }
.mon-page--cmd .mon-hero__actions .button {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}
.mon-page--cmd .mon-subnav {
  top: 0;
  padding: 5px;
  gap: 4px;
  border-radius: 12px;
}
.mon-page--cmd .mon-subnav a {
  padding: 6px 12px;
  font-size: 11px;
}
.mon-page--cmd .mon-shift-bar {
  grid-template-columns: minmax(140px, 200px) 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
}
.mon-page--cmd .mon-shift-bar__track { height: 8px; }
.mon-page--cmd .mon-shift-bar > b { font-size: 16px; min-width: 44px; }
.mon-page--cmd .mon-kpi-v2 {
  gap: 8px;
}
.mon-page--cmd .mon-kpi-v2__card {
  padding: 10px 12px 9px;
  border-radius: 12px !important;
  gap: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}
.mon-page--cmd .mon-kpi-v2__card--oee { box-shadow: inset 3px 0 0 #0f766e, 0 1px 2px rgba(15, 23, 42, .04) !important; }
.mon-page--cmd .mon-kpi-v2__card--fleet { box-shadow: inset 3px 0 0 #3b82f6, 0 1px 2px rgba(15, 23, 42, .04) !important; }
.mon-page--cmd .mon-kpi-v2__card--work { box-shadow: inset 3px 0 0 #8b5cf6, 0 1px 2px rgba(15, 23, 42, .04) !important; }
.mon-page--cmd .mon-kpi-v2__card--alert { box-shadow: inset 3px 0 0 #f59e0b, 0 1px 2px rgba(15, 23, 42, .04) !important; }
.mon-page--cmd .mon-kpi-v2__card--week { box-shadow: inset 3px 0 0 #22c55e, 0 1px 2px rgba(15, 23, 42, .04) !important; }
.mon-page--cmd .mon-kpi-v2__card--plan { box-shadow: inset 3px 0 0 #06b6d4, 0 1px 2px rgba(15, 23, 42, .04) !important; }
.mon-page--cmd .mon-kpi-v2__icon { display: none; }
.mon-page--cmd .mon-kpi-v2__body strong { font-size: 20px; }
.mon-page--cmd .mon-kpi-v2__sub { font-size: 10px; }
.mon-page--cmd .panel {
  border-radius: 12px;
}
.mon-page--cmd .panel__header {
  padding: 12px 14px;
}
.mon-page--cmd .panel__header h2 { font-size: 13px; }
.mon-page--cmd .mon-grid { gap: 10px; margin-bottom: 0; }
.mon-page--cmd .mon-chart-wrap { height: 210px; padding: 0 10px 10px; }
.mon-page--cmd .mon-chart-wrap--sm { height: 176px; }
.mon-page--cmd .mon-dir-stats {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}
.mon-page--cmd .mon-dir-stats article {
  padding: 8px 10px;
  border-radius: 10px;
}
.mon-page--cmd .mon-dir-stats b { font-size: 18px; margin-top: 2px; }
.mon-page--cmd .mon-dir-stats em { font-size: 11px; }
.mon-page--cmd .mon-dir-period {
  font-size: 12px;
  padding: 4px 10px;
}
.mon-page--cmd .mon-oee-v2 { gap: 10px; padding: 0 12px 12px; }
.mon-page--cmd .mon-oee-v2__hero {
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
}
.mon-page--cmd .mon-oee-v2__donut { width: 112px; height: 112px; }
.mon-page--cmd .mon-oee-v2__donut-center strong { font-size: 24px; }
.mon-page--cmd .mon-oee-v2__chart--parts { height: 110px; }
.mon-page--cmd .mon-oee-v2__chart--trend { height: 128px; }
.mon-page--cmd .mon-oee-v2__card { padding: 8px 10px; border-radius: 10px; }
.mon-page--cmd .mon-oee-v2__card strong { font-size: 18px; }
.mon-page--cmd .mon-oee-tabs button {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
}
.mon-page--cmd .mon-ktu-panel .mon-chart-wrap { min-height: 210px; }
.mon-page--cmd .mon-feed { max-height: 280px; padding: 0 12px 12px; }
.mon-page--cmd .mon-feed__item {
  grid-template-columns: 64px 1fr;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
}
.mon-page--cmd .mon-ktu-header { padding: 12px 14px; }
.mon-page--cmd .mon-ktu-body { padding: 0 10px 12px; gap: 10px; }
.mon-page--cmd .mon-extra-panel,
.mon-page--cmd .mon-alert-panel {
  border-radius: 12px;
  margin-bottom: 0;
}
.mon-page--cmd .mon-extra-body { padding: 12px 14px 14px; }
.mon-page--cmd .mon-floor-map { min-height: 280px; }
.mon-page--cmd .data-table td,
.mon-page--cmd .data-table th { padding: 8px 10px; }
.mon-page--cmd .mon-legend { gap: 8px; font-size: 11px; }
.mon-page--cmd .mon-board-toolbar .mon-tool select { height: 32px; }
@media (max-width: 1280px) {
  .mon-page--cmd .mon-kpi-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .mon-page--cmd .mon-hero__inner { grid-template-columns: 1fr; }
  .mon-page--cmd .mon-hero__toolbar,
  .mon-page--cmd .mon-filter { width: 100%; }
}
@media (max-width: 720px) {
  .mon-page--cmd .mon-kpi-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-page--cmd .mon-shift-bar { grid-template-columns: 1fr; }
  .mon-page--cmd .mon-oee-v2__hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.mon-page {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}
.mon-page .mon-section {
  scroll-margin-top: 88px;
  display: grid;
  gap: 14px;
}
.mon-page .mon-section__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0f172a;
}
.mon-page .mon-section__head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}
.mon-page .mon-section__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.mon-dir-period {
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 6px 12px;
}
.mon-dir-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.mon-dir-stats article {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.mon-dir-stats small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.mon-dir-stats b {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  letter-spacing: -.03em;
  color: #0f172a;
}
.mon-dir-stats em {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-style: normal;
  color: #64748b;
}
.mon-dir-stats .is-ok b { color: #0f766e; }
.mon-dir-stats .is-alert b { color: #b91c1c; }
.mon-dir-stats .is-warn b { color: #c2410c; }
.mon-dir-scrap, .mon-dir-ncrs {
  list-style: none;
  margin: 0;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mon-dir-scrap li, .mon-dir-ncrs li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.mon-dir-scrap strong, .mon-dir-ncrs strong { display: block; }
.mon-dir-scrap span, .mon-dir-ncrs span { font-size: 12px; color: #64748b; }
.mon-dir-ncrs a { color: inherit; text-decoration: none; min-width: 0; flex: 1; }
.mon-dir-ncrs a:hover strong { color: #0f766e; }
.mon-dir-ncrs em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  padding: 2px 8px;
}
.mon-page .mon-board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}
.mon-page .mon-kpi-warn {
  color: #dc2626;
  font-style: normal;
  font-weight: 600;
}
.mon-page .mon-grid--flush { margin-bottom: 0; }
.mon-page .panel {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.mon-page .panel__header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.mon-page .panel__header h2 {
  font-size: 15px;
  font-weight: 800;
}
.mon-page .panel__header p {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}
.mon-page .mon-panel--board { padding: 0; }
.mon-page .mon-panel--board .mon-board { padding: 16px 18px 20px; }
.mon-page .mon-panel--feed .mon-feed { max-height: 360px; }
.mon-page .mon-panel--table .table-scroll { padding: 0 4px 8px; }

.mon-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #0f766e33;
  box-shadow: 0 8px 32px rgba(15, 118, 110, .12);
}
.mon-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(45, 212, 191, .22), transparent 55%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(59, 130, 246, .12), transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
}
.mon-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 22px 24px;
  color: #fff;
}
.mon-hero__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.mon-hero__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #99f6e4;
}
.mon-hero h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: #fff;
}
.mon-hero__meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .72);
}
.mon-hero__meta b { color: #fff; font-weight: 700; }
.mon-hero .mon-live-pill {
  margin: 0;
  background: rgba(255, 255, 255, .14);
  color: #ecfdf5;
  border: 1px solid rgba(255, 255, 255, .2);
}
.mon-hero .mon-live-pill i { background: #34d399; }
.mon-hero__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
}
.mon-hero .mon-tool span { color: rgba(255, 255, 255, .72); }
.mon-hero .mon-tool select {
  min-width: 118px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  background: rgba(15, 23, 42, .35);
  color: #fff;
}
.mon-hero .mon-tool select option { color: #0f172a; background: #fff; }
.mon-hero__actions { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.mon-hero__actions .button,
.mon-hero__actions .button--ghost,
.mon-hero__actions .button--secondary,
.mon-hero__link {
  color: #0f172a !important;
  background: rgba(255, 255, 255, .95) !important;
  border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}
.mon-hero__actions .button:hover,
.mon-hero__actions .button--ghost:hover,
.mon-hero__actions .button--secondary:hover,
.mon-hero__link:hover {
  background: #fff !important;
  color: #0f172a !important;
}

.mon-subnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, .06);
}
.mon-subnav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.mon-subnav a:hover { background: #f1f5f9; color: #0f172a; }
.mon-subnav a.is-active {
  background: #ecfdf5;
  color: #0f766e;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}

.mon-shift-bar {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(90deg, #f8fafc, #fff);
}
.mon-shift-bar__info small {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mon-shift-bar__info strong { display: block; font-size: 15px; color: #0f172a; }
.mon-shift-bar__info em { color: #64748b; font-style: normal; font-size: 12px; }
.mon-shift-bar__track {
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06);
}
.mon-shift-bar__track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #14b8a6, #22c55e);
  border-radius: inherit;
  transition: width .4s ease;
}
.mon-shift-bar > b {
  font-size: 18px;
  font-weight: 800;
  min-width: 52px;
  text-align: right;
  color: #0f766e;
}

.mon-kpi-v2 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.mon-kpi-v2__card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .15s, box-shadow .15s;
}
.mon-kpi-v2__card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
}
.mon-kpi-v2__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
}
.mon-kpi-v2__body { display: grid; gap: 2px; min-width: 0; }
.mon-kpi-v2__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.mon-kpi-v2__body strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: #0f172a;
}
.mon-kpi-v2__sub {
  font-size: 10px;
  color: #64748b;
  line-height: 1.35;
}
.mon-kpi-v2__card--oee { border-left: 4px solid #0f766e; }
.mon-kpi-v2__card--oee .mon-kpi-v2__icon { background: #ecfdf5; color: #0f766e; }
.mon-kpi-v2__card--fleet { border-left: 4px solid #3b82f6; }
.mon-kpi-v2__card--fleet .mon-kpi-v2__icon { background: #eff6ff; color: #2563eb; }
.mon-kpi-v2__card--work { border-left: 4px solid #8b5cf6; }
.mon-kpi-v2__card--work .mon-kpi-v2__icon { background: #f5f3ff; color: #7c3aed; }
.mon-kpi-v2__card--alert { border-left: 4px solid #f59e0b; }
.mon-kpi-v2__card--alert .mon-kpi-v2__icon { background: #fffbeb; color: #d97706; }
.mon-kpi-v2__card--week { border-left: 4px solid #22c55e; }
.mon-kpi-v2__card--week .mon-kpi-v2__icon { background: #f0fdf4; color: #16a34a; }
.mon-kpi-v2__card--plan { border-left: 4px solid #06b6d4; }
.mon-kpi-v2__card--plan .mon-kpi-v2__icon { background: #ecfeff; color: #0891b2; }
@media (max-width: 1280px) {
  .mon-kpi-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mon-kpi-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.mon-kpi {
  margin-bottom: 18px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1280px) {
  .mon-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mon-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mon-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.mon-grid--2 { grid-template-columns: 1fr 1fr; }
.mon-chart-wrap { position: relative; height: 260px; padding: 0 12px 12px; }
.mon-oee-v2-wrap .panel__header.mon-oee-v2__head {
  align-items: flex-start;
  gap: 12px;
}
.mon-oee-v2-panel[hidden] { display: none !important; }
.mon-oee-v2 {
  display: grid;
  gap: 16px;
  padding: 0 16px 16px;
}
.mon-oee-v2__hero {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .92) 0%, rgba(236, 253, 245, .95) 100%),
    linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
  border: var(--hairline) solid #dbe4ee;
  box-shadow: var(--shadow-soft);
}
html[data-theme="dark"] .mon-oee-v2__hero {
  background:
    linear-gradient(145deg, rgba(26, 35, 39, .96) 0%, rgba(16, 40, 36, .92) 100%);
  border-color: var(--line);
}
.mon-oee-v2__donut {
  position: relative;
  width: 148px;
  height: 148px;
}
.mon-oee-v2__donut canvas {
  width: 100% !important;
  height: 100% !important;
  image-rendering: auto;
}
.mon-oee-v2__donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.mon-oee-v2__donut-center strong {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.mon-oee-v2__donut-center span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}
.mon-oee-v2__hero-meta { display: grid; gap: 10px; min-width: 0; }
.mon-oee-v2__formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mon-oee-v2__times { color: #94a3b8; font-weight: 700; }
.mon-oee-v2__chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}
.mon-oee-v2__chip--a { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.mon-oee-v2__chip--p { background: #ecfdf5; color: #0f766e; border-color: #a7f3d0; }
.mon-oee-v2__chip--q { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.mon-oee-v2__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.mon-oee-v2__stats > div {
  display: grid;
  gap: 2px;
}
.mon-oee-v2__stats small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.mon-oee-v2__stats b { font-size: 18px; color: #0f172a; }
.mon-oee-v2__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}
.mon-oee-v2__box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px 8px;
  background: #fff;
}
.mon-oee-v2__box h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.mon-oee-v2__chart { position: relative; }
.mon-oee-v2__chart--parts { height: 130px; }
.mon-oee-v2__chart--trend { height: 150px; }
.mon-oee-v2__chart--donut { height: 200px; }
.mon-oee-v2__chart--bars { height: 120px; }
.mon-oee-v2__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mon-oee-v2__card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.mon-oee-v2__card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}
.mon-oee-v2__card span {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.mon-oee-v2__card strong {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.mon-oee-v2__card small { font-size: 10px; color: #94a3b8; }
.mon-oee-v2__card--a strong { color: #2563eb; }
.mon-oee-v2__card--p strong { color: #0f766e; }
.mon-oee-v2__card--q strong { color: #16a34a; }
.mon-oee-v2--detail { gap: 12px; }
.mon-oee-v2__detail-top {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 12px;
  align-items: stretch;
}
.mon-oee-v2__kpi {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  align-content: start;
}
.mon-oee-v2__kpi small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.mon-oee-v2__kpi strong {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}
.mon-oee-v2__kpi em {
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  color: #475569;
}
.mon-oee-v2__kpi p { margin: 4px 0 0; font-size: 11px; }
.mon-oee-v2__kpi--a { background: linear-gradient(180deg, #eff6ff, #fff); border-color: #bfdbfe; }
.mon-oee-v2__kpi--a strong { color: #1d4ed8; }
.mon-oee-v2__kpi--p { background: linear-gradient(180deg, #ecfdf5, #fff); border-color: #a7f3d0; }
.mon-oee-v2__kpi--p strong { color: #0f766e; }
.mon-oee-v2__kpi--q { background: linear-gradient(180deg, #f0fdf4, #fff); border-color: #bbf7d0; }
.mon-oee-v2__kpi--q strong { color: #15803d; }
.mon-oee { display: grid; grid-template-columns: 160px 1fr; gap: 22px; align-items: center; padding: 0 16px 12px; }
.mon-oee-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.mon-oee-tabs button {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.mon-oee-tabs button.is-on {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #0f766e;
}
.mon-oee-panel[hidden] { display: none !important; }
.mon-oee-part {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.mon-oee-part:hover .mon-oee-parts__head span { color: #0f766e; }
.mon-oee-solo {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 8px 16px 18px;
  text-align: center;
}
.mon-oee-solo__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: #1d4ed8;
}
.mon-oee-solo__title--a { color: #2563eb; }
.mon-oee-solo__title--p { color: #0f766e; }
.mon-oee-solo__title--q { color: #16a34a; }
.mon-oee-solo__badge {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: 14px;
  font-weight: 800;
}
.mon-gauge {
  --pct: 0;
  width: 148px; height: 148px; margin: 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background .6s ease;
  background:
    radial-gradient(closest-side, #fff 72%, transparent 73% 100%),
    conic-gradient(var(--accent-dark) calc(var(--pct) * 1%), #e8edf2 0);
}
.mon-gauge span { font-size: 28px; font-weight: 700; color: #0f172a; }
.mon-gauge--solo {
  width: 220px;
  height: 220px;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(closest-side, #fff 68%, transparent 69% 100%),
    conic-gradient(var(--solo-color, var(--accent-dark)) calc(var(--pct) * 1%), #e8edf2 0);
}
.mon-gauge--a { --solo-color: #2563eb; }
.mon-gauge--p { --solo-color: #0f766e; }
.mon-gauge--q { --solo-color: #16a34a; }
.mon-gauge--solo strong {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: #1d4ed8;
  line-height: 1;
}
.mon-gauge--solo em {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  color: #64748b;
  font-weight: 600;
}
.mon-oee-solo__btn {
  width: min(100%, 320px);
  margin-top: 4px;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.mon-oee-parts { display: grid; gap: 12px; }
.mon-oee-parts__head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 12px; }
.mon-bar {
  display: block; height: 10px; border-radius: 999px; background: #eef2f6; position: relative; overflow: hidden;
}
.mon-bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit;
  transition: width .6s cubic-bezier(.22,.8,.28,1);
}
.mon-bar--a::after { background: #3b82f6; }
.mon-bar--p::after { background: var(--accent); }
.mon-bar--q::after { background: #22c55e; }
.mon-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: #64748b; }
.mon-board { padding: 0 18px 8px; }
.mon-workshop { padding: 4px 0 18px; }
.mon-workshop h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: #334155;
}
.mon-workshop h3 small { color: #94a3b8; font-weight: 600; margin-left: 6px; }
.mon-machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mon-machine {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  border-left: 4px solid #94a3b8;
  transition: box-shadow .15s, transform .15s;
  overflow: hidden;
}
.mon-machine:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.mon-machine--free { border-left-color: #94a3b8; }
.mon-machine--idle { border-left-color: #64748b; }
.mon-machine--setup { border-left-color: #d97706; }
.mon-machine--working,
.mon-machine--progress { border-left-color: #16a34a; }
.mon-machine--incident { border-left-color: #dc2626; background: #fffafb; }
.mon-machine--inactive { opacity: .72; }
.mon-machine__top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.mon-machine__top b { font-size: 13px; line-height: 1.35; font-weight: 800; color: #0f172a; }
.mon-machine__top span {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.mon-machine--free .mon-machine__top span { background: #f1f5f9; color: #64748b; }
.mon-machine--working .mon-machine__top span,
.mon-machine--progress .mon-machine__top span { background: #dcfce7; color: #166534; }
.mon-machine--setup .mon-machine__top span { background: #fef3c7; color: #b45309; }
.mon-machine--incident .mon-machine__top span { background: #fee2e2; color: #b91c1c; }
.mon-machine--idle .mon-machine__top span { background: #e2e8f0; color: #475569; }
.mon-board { padding: 0 18px 8px; }
.mon-board > .empty-state { text-align: center; }
.mon-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.mon-dot--free { background: #94a3b8; }
.mon-dot--idle { background: #64748b; }
.mon-dot--setup { background: #d97706; }
.mon-dot--working,
.mon-dot--progress { background: #16a34a; }
.mon-dot--incident { background: #dc2626; }
.mon-dot--inactive { background: #cbd5e1; }
.mon-machine__load { margin-top: 8px; font-size: 11px; color: #64748b; }
.mon-machine__load i {
  display: block; margin-top: 5px; height: 7px; border-radius: 999px; background: #eef2f6; position: relative; overflow: hidden;
}
.mon-machine__load i::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: #0ea5e9; border-radius: inherit;
}
.mon-machine__meta { display: flex; gap: 10px; margin-top: 8px; font-size: 11px; color: #475569; }
.mon-machine__progress { margin-top: 8px; height: 5px; border-radius: 999px; background: #eef2f6; overflow: hidden; }
.mon-machine__progress i { display: block; height: 100%; background: #22c55e; }
.mon-machine__incident { display: block; margin-top: 8px; font-size: 11px; color: var(--accent-dark); font-style: normal; }
@media (max-width: 980px) {
  .mon-grid--2 { grid-template-columns: 1fr; }
  .mon-oee { grid-template-columns: 1fr; }
  .mon-oee-v2__hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .mon-oee-v2__formula { justify-content: center; }
  .mon-oee-v2__stats { justify-content: center; }
  .mon-oee-v2__grid { grid-template-columns: 1fr; }
  .mon-oee-v2__cards { grid-template-columns: 1fr; }
  .mon-oee-v2__detail-top { grid-template-columns: 1fr; }
}

.mon-grid--3 { grid-template-columns: repeat(3, 1fr); }
.mon-chart-wrap--sm { height: 220px; }
.mon-head .mon-live-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 8px;
  padding: 2px 8px; border-radius: 999px; background: #ecfdf5; color: #047857;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; vertical-align: middle;
}
.mon-live-pill i {
  width: 7px; height: 7px; border-radius: 50%; background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,.55);
}
.mon-live-pill.is-blink i { animation: monPulse 1s ease-out; }
.mon-live-pill.is-loading { background: #eff6ff; color: #1d4ed8; }
.mon-live-pill.is-loading i { background: #3b82f6; }
.mon-live-pill.is-error { background: #fef2f2; color: #b91c1c; }
.mon-live-pill.is-error i { background: #ef4444; }
@keyframes monPulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  100% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
}
.mon-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.mon-tool { display: grid; gap: 4px; font-size: 11px; color: #64748b; }
.mon-tool select {
  min-width: 110px; height: 36px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 10px; background: #fff; color: #0f172a;
}
.mon-feed {
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}
.mon-feed__item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafbfc;
  font-size: 12px;
  transition: background .15s;
}
.mon-feed__item:hover { background: #f8fafc; }
.mon-feed__item time { color: #94a3b8; font-variant-numeric: tabular-nums; }
.mon-feed__item--incident { border-left: 3px solid var(--accent); }
.mon-feed__item--shift { border-left: 3px solid #22c55e; }
.mon-kpi .metric { min-height: 104px; }
@media (max-width: 1100px) {
  .mon-grid--3 { grid-template-columns: 1fr; }
  .mon-shift-bar { grid-template-columns: 1fr; }
  .mon-hero__inner { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .mon-toolbar { width: 100%; }
  .mon-hero__toolbar { width: 100%; }
  .mon-subnav { top: 0; border-radius: 12px; }
}

/* ?????? Classic industrial polish / page motion ?????? */
.admin-body {
  background: var(--bg);
}
.admin-body .admin-shell {
  min-height: 100vh;
}
.page-enter {
  opacity: 1;
  transform: none;
}
.page-enter-active {
  opacity: 1;
  transform: none;
  transition: opacity .35s ease, transform .35s var(--ease-out, cubic-bezier(.22, 1, .36, 1));
}
.admin-body.page-leave .admin-content {
  opacity: .35;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.admin-content > .page-heading,
.admin-content > section,
.admin-content > .panel,
.admin-content > form,
.admin-content > .stat-grid,
.admin-content > .dashboard-kpis,
.admin-content > .dash-live-board,
.admin-content > .dashboard-grid {
  /* ????????????? both: ????????????????????? ???????? ?????????????????????????? ????????????????????????????????? opacity=0 ???? ???????????? ???????????????? JS ???????????????????? ?????????????????????????? */
  animation: pageRise .55s cubic-bezier(.22, 1, .36, 1);
}
.admin-content > *:nth-child(1) { animation-delay: .02s; }
.admin-content > *:nth-child(2) { animation-delay: .06s; }
.admin-content > *:nth-child(3) { animation-delay: .1s; }
.admin-content > *:nth-child(4) { animation-delay: .14s; }
.admin-content > *:nth-child(5) { animation-delay: .18s; }
.admin-content > *:nth-child(6) { animation-delay: .22s; }
@keyframes pageRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.sidebar__nav a {
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.button, .icon-button {
  transition: box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.logout-form { display: inline-flex; margin: 0; }
.logout-form__btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  width: auto;
  height: auto;
  padding: 0 2px;
}
.user-menu .logout-form__btn:hover {
  color: var(--accent-dark);
}

/* Monitoring live motion */
.mon-live-pill.is-live i {
  animation: dashLivePulse 1.6s ease-out infinite;
}
.mon-flash {
  color: var(--accent-dark) !important;
  transition: color .35s ease, transform .35s ease;
  display: inline-block;
  transform: translateY(-1px);
}
.mon-machine--live {
  position: relative;
  overflow: hidden;
}
.mon-machine--working {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .22);
}
.mon-machine--working::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #22c55e, #86efac, #22c55e);
  background-size: 100% 200%;
  animation: monBarFlow 2.2s linear infinite;
}
.mon-machine--incident {
  animation: monIncidentGlow 2.4s ease-in-out infinite;
}
.mon-machine__progress i,
.mon-machine__load i::after,
.mon-shift-bar__track i {
  transition: width .8s cubic-bezier(.22, 1, .36, 1);
  background-size: 200% 100%;
  animation: monShimmer 2.8s linear infinite;
}
.mon-open-live {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
@keyframes monBarFlow {
  from { background-position: 0 0; }
  to { background-position: 0 200%; }
}
@keyframes monIncidentGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(26, 168, 150, .18); }
  50% { box-shadow: 0 0 0 1px rgba(26, 168, 150, .45), 0 8px 20px rgba(26, 168, 150, .12); }
}
@keyframes monShimmer {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
  100% { filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .page-enter,
  .page-enter-active,
  .admin-content > *,
  .mon-machine--working::before,
  .mon-machine--incident,
  .mon-machine__progress i,
  .mon-live-pill.is-live i {
    animation: none !important;
    transition: none !important;
  }
}

/* Unread notification popup */
.notify-toast-stack {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}
.notify-toast {
  pointer-events: auto;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  animation: notifyToastIn .28s ease-out;
}
.notify-toast__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.notify-toast__head b {
  font-size: 14px;
  line-height: 1.3;
}
.notify-toast__head button {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.notify-toast p {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.4;
}
.notify-toast__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
@keyframes notifyToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.notify-toast-stack {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.notify-toast { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.notify-toast:hover { transform: translateY(-2px); box-shadow: 0 22px 46px rgba(15, 23, 42, .2); }
.notify-toast:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notify-toast--info { border-left-color: #3b82f6; }
.notify-toast--success { border-left-color: #16a34a; }
.notify-toast--warning { border-left-color: #f59e0b; }
.notify-toast--incident,
.notify-toast--danger { border-left-color: #dc2626; }
.notify-toast__go {
  color: var(--accent-dark, var(--accent));
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.notify-toast__go:hover { text-decoration: underline; }
.notify-toast-more {
  pointer-events: auto;
  align-self: flex-end;
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}
.notify-toast-more:hover { background: #f9fafb; }

.notify-dropdown__os {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid #eef0f2;
  background: #f8fafc;
  color: var(--accent-dark, var(--accent));
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.notify-dropdown__os[hidden] { display: none; }
.notify-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #f2f4f6;
  border-left: 3px solid transparent;
}
.notify-row .notify-item { flex: 1; min-width: 0; border-bottom: 0; }
.notify-row--info { border-left-color: #3b82f6; }
.notify-row--success { border-left-color: #16a34a; }
.notify-row--warning { border-left-color: #f59e0b; }
.notify-row--incident,
.notify-row--danger { border-left-color: #dc2626; }
.notify-row.is-pending { opacity: .5; pointer-events: none; }
.notify-row__actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
}
.notify-row__actions form { margin: 0; }
.notify-row__btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #16a34a;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.notify-row__btn:hover { background: #f0fdf4; }
.notify-row__btn--danger { color: #9ca3af; }
.notify-row__btn--danger:hover { background: #fef2f2; color: #dc2626; }

.is-notify-target {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 8px;
  animation: notifyTargetPulse 1s ease-in-out 3;
}
@keyframes notifyTargetPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .45); }
  50% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

/* Operators on machines planner */
.omd-page { display: grid; gap: 16px; }
.omd-filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.omd-filters label { display: grid; gap: 6px; }
.omd-filters label > span { font-size: 12px; color: #6b7280; font-weight: 600; }
.omd-date-nav { display: flex; gap: 8px; align-items: center; }
.omd-date-nav input[type="date"] { flex: 1; min-height: 40px; }
.omd-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.omd-layout.has-editor {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .95fr);
}
.omd-board .panel__header,
.omd-editor .panel__header { border-bottom: 1px solid var(--line); }
.omd-board__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.omd-mass-clear { margin: 0; }
.omd-cards {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.omd-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  animation: omdCardIn .45s cubic-bezier(.22,1,.36,1) both;
  animation-delay: var(--omd-delay, 0ms);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  box-shadow: none;
}
.omd-card:hover {
  border-color: #b8c2cb;
  box-shadow: none;
  transform: none;
}
.omd-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,168,150,.15);
}
.omd-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.omd-card__head > div:nth-child(2) { flex: 1; min-width: 0; }
.omd-card__head b { display: block; font-size: 14px; }
.omd-card__head small { color: #6b7280; font-size: 12px; }
.omd-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.omd-card__free { margin: 0; }
.omd-free-btn {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, .22) !important;
}
.omd-free-btn:hover {
  background: #fef2f2 !important;
  border-color: rgba(185, 28, 28, .35) !important;
}
.omd-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffe5a3, var(--accent));
  color: #1a1408;
  font-weight: 700;
  font-size: 12px;
}
.omd-card__avatar--lg { width: 52px; height: 52px; font-size: 14px; border-radius: 14px; }
.omd-card__machines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.omd-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e7ebf0;
  background: #f7f8fa;
  font-size: 12px;
  font-weight: 600;
}
.omd-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.45);
  animation: omdDot 1.8s ease-out infinite;
}
.omd-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 48px 20px;
  text-align: center;
  color: #6b7280;
}
.omd-empty span { font-size: 28px; }
.omd-empty b { color: #111827; font-size: 15px; }
.omd-empty p { margin: 0; max-width: 280px; }
.omd-empty--side { min-height: 280px; place-content: center; }
.omd-empty--compact { padding: 24px 12px; }
.omd-editor { position: sticky; top: calc(var(--topbar-h) + 12px); }
.omd-editor__head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff8ea, #fff);
}
.omd-editor__head h2 { margin: 0 0 2px; font-size: 17px; }
.omd-editor__head p { margin: 0; color: #6b7280; font-size: 12px; }
.omd-editor__form { padding: 14px 16px 10px; display: grid; gap: 12px; }
.omd-period {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.omd-period__item {
  position: relative;
  cursor: pointer;
}
.omd-period__item input { position: absolute; opacity: 0; pointer-events: none; }
.omd-period__item span {
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid #e5e8ec;
  border-radius: 12px;
  background: #fff;
  transition: .18s ease;
}
.omd-period__item b { font-size: 13px; }
.omd-period__item small { color: #6b7280; font-size: 11px; }
.omd-period__item input:checked + span {
  border-color: var(--accent);
  background: #fff8ea;
  box-shadow: 0 0 0 3px rgba(26,168,150,.12);
}
.omd-editor__hint {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f6f9;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.4;
}
.omd-machine-groups { display: grid; gap: 14px; max-height: 420px; overflow: auto; padding-right: 4px; }
.omd-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.omd-group__title b { font-size: 13px; }
.omd-group__title small {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #eef1f4;
  color: #4b5563;
  font-weight: 700;
}
.omd-machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.omd-machine {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #e5e8ec;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: .18s ease;
}
.omd-machine:hover { border-color: #f0c56d; transform: translateY(-1px); }
.omd-machine.is-checked {
  border-color: var(--accent);
  background: linear-gradient(180deg, #fff9ec, #fff);
  box-shadow: 0 8px 18px rgba(26,168,150,.1);
}
.omd-machine input { position: absolute; opacity: 0; pointer-events: none; }
.omd-machine__check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  border: 1.5px solid #c5ccd4;
  border-radius: 6px;
  background: #fff;
  position: relative;
  transition: .15s ease;
}
.omd-machine.is-checked .omd-machine__check {
  border-color: var(--accent-dark);
  background: var(--accent);
}
.omd-machine.is-checked .omd-machine__check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #1a1408;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.omd-machine__body { display: grid; gap: 2px; min-width: 0; }
.omd-machine__body b { font-size: 12px; line-height: 1.3; }
.omd-machine__body small { color: #6b7280; font-size: 11px; }
.omd-editor__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #eef1f4;
}
.omd-selected-count { color: #4b5563; font-size: 13px; }
.omd-selected-count b { color: #111827; }
.omd-clear-form { padding: 0 16px 16px; }
.omd-chip--muted {
  background: #f3f4f6;
  color: #6b7280;
  border-style: dashed;
}
.omd-chip--muted i { background: #9ca3af; box-shadow: none; animation: none; }
.omd-card.is-pending {
  border-style: dashed;
  background: linear-gradient(180deg, #fffdf8, #fff);
}
.omd-schedule-banner {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.omd-schedule-banner b { font-size: 13px; }
.omd-schedule-banner p { margin: 0; color: var(--muted); font-size: 12px; }
.omd-schedule-banner .button { justify-self: start; margin-top: 4px; }
.omd-schedule-banner--ok {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #fff);
}
@keyframes omdCardIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes omdDot {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
  70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@media (max-width: 1100px) {
  .omd-layout.has-editor { grid-template-columns: 1fr; }
  .omd-editor { position: static; }
  .omd-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .omd-filters { grid-template-columns: 1fr; }
  .omd-period { grid-template-columns: 1fr; }
}

/* ?????????????????????????????????? ?????????????????????????? */
.data-export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.data-export-card .panel__header {
  padding-bottom: 16px;
}
.data-export-form {
  padding: 0 23px 23px;
  display: grid;
  gap: 18px;
}
.data-export-period {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}
.data-export-period legend {
  padding: 0;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.data-export-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg, #f7f8fa);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.data-export-radio:has(input:checked) {
  border-color: var(--accent, #2f6fed);
  background: color-mix(in srgb, var(--accent, #2f6fed) 8%, white);
}
.data-export-radio input {
  margin-top: 3px;
}
.data-export-radio span {
  font-size: 13px;
  line-height: 1.35;
}
.data-export-radio em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}
.data-export-fields {
  display: grid;
  gap: 12px;
}
.data-export-field {
  display: grid;
  gap: 6px;
  margin: 0;
}
.data-export-field.is-hidden {
  display: none;
}
.data-export-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.data-export-field input {
  width: 100%;
  max-width: 240px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}
.data-export-actions {
  display: flex;
  gap: 10px;
}
@media (max-width: 900px) {
  .data-export-grid {
    grid-template-columns: 1fr;
  }
}

.cnc-agent-hint__body {
  padding: 0 23px 20px;
  font-size: 13px;
  line-height: 1.5;
}
.cnc-agent-hint__body code {
  font-size: 12px;
  word-break: break-all;
}
.cnc-monitor-toggle input {
  margin-right: 8px;
}
#machineModal.modal--wide {
  width: min(96vw, 920px);
}
.modal--machine .modal__card {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 860px);
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow:
    0 28px 60px rgba(15, 23, 42, .18),
    inset 0 1px 0 rgba(255, 255, 255, .85);
}
.modal__header--machine {
  padding: 18px 22px 16px;
  border-bottom: 1px solid #e8edf4;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(13, 148, 136, .12), transparent 55%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.machine-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}
.machine-modal-head__badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, .18);
  background: linear-gradient(145deg, rgba(13, 148, 136, .14), rgba(13, 148, 136, .06));
  color: #0f766e;
  box-shadow: 0 10px 22px rgba(13, 148, 136, .12);
}
.modal__header--machine .machine-modal-head__text {
  min-width: 0;
  flex: 1 1 auto;
}
.modal__header--machine h2 {
  margin-bottom: 4px;
  font-size: 19px;
}
.machine-modal-subtitle {
  margin: 0;
  max-width: 56ch;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}
.machine-modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  background: rgba(255, 255, 255, .9);
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.machine-modal-close:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #fff;
  transform: translateY(-1px);
}
.machine-modal-tabs {
  flex: 0 0 auto;
  padding: 12px 22px 0;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf4;
}
.machine-modal-tabs__track {
  position: relative;
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: none;
}
.machine-modal-tabs__track::-webkit-scrollbar {
  display: none;
}
.machine-modal-tabs__glider {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13, 148, 136, .16), rgba(13, 148, 136, .08));
  border: 1px solid rgba(13, 148, 136, .22);
  box-shadow: 0 8px 18px rgba(13, 148, 136, .12);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1), width .32s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
  z-index: 0;
}
.modal__card--machine .machine-modal-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 10px 16px;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: color .18s ease;
}
.machine-modal-tab__label {
  min-width: 0;
}
.modal__card--machine .machine-modal-tab:hover:not(.is-active) {
  color: #334155;
}
.modal__card--machine .machine-modal-tab.is-active {
  color: #0f766e;
}
.modal__card--machine .machine-modal-tab:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}
.machine-modal-tab__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #0d9488;
}
.machine-modal-tab.has-dot:not(.is-active) {
  color: #334155;
}
.modal__body--machine {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 22px 18px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(13, 148, 136, .05), transparent 50%),
    #f1f5f9;
}
.machine-form-layout {
  display: grid;
  gap: 14px;
}
.machine-form-card {
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}
.machine-form-card__head {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
}
.machine-form-card__head strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.machine-form-card__head span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.modal__body--machine .form-grid,
.modal__body--machine .machine-form-grid {
  padding: 0;
  margin: 0;
}
.modal__card--machine .machine-form-grid {
  gap: 14px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.modal__card--machine .machine-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.modal__card--machine .machine-form-grid label > span {
  line-height: 1.2;
}
.modal__card--machine .machine-form-grid input:not([type="checkbox"]):not([type="radio"]),
.modal__card--machine .machine-form-grid select,
.modal__card--machine .machine-form-grid textarea {
  width: 100%;
  height: auto;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d7dee8;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.modal__card--machine .machine-form-grid input:not([type="checkbox"]):not([type="radio"]):hover,
.modal__card--machine .machine-form-grid select:hover,
.modal__card--machine .machine-form-grid textarea:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.modal__card--machine .machine-form-grid textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.45;
}
.modal__card--machine .machine-form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.modal__card--machine .machine-form-grid select:focus,
.modal__card--machine .machine-form-grid textarea:focus {
  border-color: #0d9488;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .12);
}
.machine-form-split {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.machine-notes-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  min-height: 100%;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}
.machine-notes-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(135deg, rgba(13, 148, 136, .08), transparent 70%);
}
.machine-notes-card__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(13, 148, 136, .16);
  background: rgba(255, 255, 255, .9);
  color: #0f766e;
}
.machine-notes-card__head strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.machine-notes-card__head span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.machine-notes-card__body {
  padding: 12px 14px 10px;
  min-height: 0;
}
.machine-notes-card__body textarea {
  width: 100%;
  min-height: 148px;
  height: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.machine-notes-card__body textarea::placeholder {
  color: #94a3b8;
}
.machine-notes-card__body textarea:hover {
  border-color: #cbd5e1;
}
.machine-notes-card__body textarea:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .12);
}
.machine-notes-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 12px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}
.machine-notes-card__foot [data-machine-notes-count] {
  color: #64748b;
}
.machine-form-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}
.machine-photo-card {
  display: grid;
  gap: 10px;
  height: 100%;
}
.machine-photo-card__frame {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(13, 148, 136, .08), transparent 55%),
    linear-gradient(180deg, #f8fafc, #eef2f7);
}
.machine-photo-card__frame .machine-photo--preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 168px;
  object-fit: cover;
}
.machine-photo-card__frame .machine-photo--preview[hidden] {
  display: none !important;
}
.machine-photo-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 6px;
  place-items: center;
  align-content: center;
  padding: 16px;
  color: #94a3b8;
  text-align: center;
}
.machine-photo-card__placeholder svg {
  color: #cbd5e1;
}
.machine-photo-card__placeholder span {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.machine-photo-card__placeholder em {
  font-size: 11px;
  font-style: normal;
  color: #94a3b8;
}
.machine-photo-card__placeholder[hidden] {
  display: none !important;
}
.machine-photo-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.machine-photo-card__delete[hidden] {
  display: none !important;
}
.machine-photo-card__actions:not(:has(.machine-photo-card__delete:not([hidden]))) {
  grid-template-columns: 1fr;
}
.machine-photo-card__upload {
  display: block;
  min-width: 0;
  cursor: pointer;
}
.machine-photo-card__upload input[type="file"] {
  display: none !important;
}
.machine-photo-card__upload span,
.machine-photo-card__delete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.machine-photo-card__upload span {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}
.machine-photo-card__upload:hover span {
  border-color: #0d9488;
  color: #0f766e;
  background: #f0fdfa;
}
.machine-photo-card__delete {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  font: inherit;
  cursor: pointer;
}
.machine-photo-card__delete svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
.machine-photo-card__delete:hover {
  border-color: #f87171;
  background: #fef2f2;
}
.machine-photo-card__delete.is-marked {
  border-color: #f87171;
  background: #fef2f2;
  color: #991b1b;
}
.machine-photo-card__hint {
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}
.machine-photo-card__hint[hidden] {
  display: none !important;
}
.form-actions--machine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 14px 22px 18px;
  border-top: 1px solid #e8edf4;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.machine-modal-footnote {
  margin: 0;
  max-width: 44ch;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.machine-modal-footactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.machine-modal-footactions .button--primary {
  min-width: 132px;
  box-shadow: 0 10px 22px rgba(13, 148, 136, .22);
}
.modal__card--machine .form-grid {
  gap: 12px;
}
.modal__card--machine .form-grid label {
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.cnc-monitor-section {
  margin-top: 0;
  padding: 0;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  overflow: hidden;
}
.cnc-monitor-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
}
.cnc-monitor-section__intro strong {
  display: block;
  font-size: 15px;
}
.cnc-monitor-section__intro p {
  margin: 4px 0 0;
  max-width: 48ch;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}
.cnc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.cnc-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cnc-toggle__track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .2s ease;
}
.cnc-toggle__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
  transition: transform .2s ease;
}
.cnc-toggle input:checked + .cnc-toggle__track {
  background: #0d9488;
}
.cnc-toggle input:checked + .cnc-toggle__track::after {
  transform: translateX(18px);
}
.cnc-toggle__label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.cnc-monitor-section__idle {
  padding: 28px 20px;
  text-align: center;
  color: #64748b;
}
.cnc-monitor-section__idle-icon {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1;
  color: #94a3b8;
}
.cnc-monitor-section__idle p {
  margin: 0 auto;
  max-width: 36ch;
  font-size: 13px;
  line-height: 1.5;
}
.cnc-monitor-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cnc-monitor-switch input {
  margin: 0;
}
.cnc-monitor-section__body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 0;
}
.cnc-monitor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .85fr);
  gap: 16px;
  align-items: start;
}
.cnc-monitor-layout__main {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.cnc-block {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  background: #fff;
}
.cnc-block__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.modal--machine .cnc-block label,
.modal--machine .cnc-monitor-section .cnc-template-advanced__grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.modal--machine .cnc-block label > span,
.modal--machine .cnc-monitor-section .cnc-template-advanced__grid label > span {
  line-height: 1.2;
}
.modal--machine .cnc-block input:not([type="checkbox"]):not([type="radio"]),
.modal--machine .cnc-block select,
.modal--machine .cnc-monitor-section .cnc-template-advanced__grid input:not([type="checkbox"]):not([type="radio"]),
.modal--machine .cnc-monitor-section .cnc-template-advanced__grid select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #0f172a;
  box-sizing: border-box;
}
.modal--machine .cnc-block input:not([type="checkbox"]):not([type="radio"]):focus,
.modal--machine .cnc-block select:focus,
.modal--machine .cnc-monitor-section .cnc-template-advanced__grid input:focus,
.modal--machine .cnc-monitor-section .cnc-template-advanced__grid select:focus {
  outline: none;
  border-color: #0d9488;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}
.modal--machine .cnc-step__grid {
  gap: 10px 12px;
  align-items: stretch;
}
.modal--machine .cnc-step__grid--3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(84px, 0.75fr);
}
.modal--machine .cnc-monitor-section .cnc-template-advanced__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 12px;
  padding: 0;
}
.cnc-token-card {
  position: sticky;
  top: 0;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #99f6e4;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
  box-shadow: 0 10px 24px rgba(13, 148, 136, .08);
}
.cnc-token-card__head {
  display: grid;
  gap: 2px;
}
.cnc-token-card__head strong {
  font-size: 14px;
  color: #0f766e;
}
.cnc-token-card__hint {
  font-size: 11px;
  color: #0f766e;
  opacity: .85;
}
.cnc-token-card__lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #115e59;
}
.cnc-token-card__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  background: #fff;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}
.cnc-token-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cnc-copy-stack {
  display: grid;
  gap: 10px;
}
.cnc-copy-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 8px;
  align-items: center;
}
.cnc-copy-row__label {
  font-size: 12px;
  color: #64748b;
}
.cnc-copy-row__value {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 11px;
  word-break: break-all;
}
.cnc-advanced__lead {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}
.cnc-advanced--fold {
  background: #f8fafc;
}
.cnc-step {
  display: grid;
  gap: 10px;
}
.cnc-step__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.cnc-step__label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #0d9488;
  color: #fff;
  font-size: 12px;
}
.cnc-step__grid {
  display: grid;
  gap: 12px;
}
.cnc-step__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cnc-step__lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}
.cnc-template-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}
.cnc-template-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cnc-template-card__vendor {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0369a1;
}
.cnc-template-card__badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
}
.cnc-template-card__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
}
.cnc-template-card__setup {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}
.cnc-agent-creds {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  background: #fff;
}
.cnc-agent-creds__row {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.cnc-agent-creds__row--token {
  grid-template-columns: 110px 1fr auto auto;
}
.cnc-agent-creds__key {
  font-size: 12px;
  color: #64748b;
}
.cnc-agent-creds__val {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 11px;
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cnc-agent-creds__token {
  width: 100%;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
}
.cnc-token-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}
.cnc-token-note.is-ok {
  color: #15803d;
}
.cnc-token-note.is-warn {
  color: #b45309;
}
.cnc-advanced {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.cnc-advanced summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.cnc-advanced .cnc-template-advanced__grid {
  margin-top: 12px;
}
@media (max-width: 760px) {
  .machine-modal-tabs {
    padding: 10px 16px 0;
  }
  .machine-modal-tabs__track {
    width: 100%;
  }
  .modal__card--machine .machine-modal-tab {
    padding: 9px 12px;
    font-size: 12px;
  }
  .modal__body--machine {
    padding: 14px 16px 16px;
  }
  .modal__card--machine .machine-form-grid {
    grid-template-columns: 1fr;
  }
  .machine-form-split {
    grid-template-columns: 1fr;
  }
  .form-actions--machine {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
  }
  .machine-modal-footactions {
    width: 100%;
    margin-left: 0;
  }
  .machine-modal-footactions .button {
    flex: 1 1 auto;
  }
  .cnc-monitor-layout {
    grid-template-columns: 1fr;
  }
  .cnc-token-card {
    position: static;
  }
  .cnc-step__grid--3,
  .cnc-agent-creds__row,
  .cnc-agent-creds__row--token,
  .cnc-copy-row {
    grid-template-columns: 1fr;
  }
  .cnc-agent-creds__key,
  .cnc-copy-row__label {
    margin-bottom: -4px;
  }
}
.cnc-template-panel {
  display: grid;
  gap: 10px;
}
.cnc-template-hint {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  font-size: 12px;
  line-height: 1.45;
}
.cnc-template-hint ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.cnc-template-hint small {
  display: block;
  margin-top: 6px;
  color: #475569;
}
.cnc-template-advanced {
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.cnc-template-advanced__grid {
  margin-top: 10px;
}
[data-cnc-field].is-hidden {
  display: none;
}
.mon-machine__cnc {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.35;
}
.mon-machine__cnc.is-online {
  border-color: #86efac;
  background: #f0fdf4;
}
.mon-machine__cnc.is-offline {
  border-color: #fecaca;
  background: #fef2f2;
}
.mon-machine__cnc.is-stale {
  border-color: #fde68a;
  background: #fffbeb;
}
.mon-machine__cnc b {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.mon-machine__cnc em {
  display: block;
  margin-top: 4px;
  color: #b91c1c;
  font-style: normal;
}
.mon-machine__cnc-net {
  display: block;
  font-size: 11px;
  color: #64748b;
}
.mon-machine__cnc.is-online .mon-machine__cnc-net { color: #15803d; }
.mon-machine__cnc-shop {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.mon-machine__cnc-shop em {
  font-style: normal;
  font-weight: 600;
  color: #64748b;
}
.mon-machine__cnc-shop em:not(:empty)::before {
  content: '· ';
  color: #cbd5e1;
}
.mon-machine__cnc.cnc-shop--idle .mon-machine__cnc-shop { color: #d97706; }
.mon-machine__cnc.cnc-shop--wait .mon-machine__cnc-shop { color: #2563eb; }
.mon-machine__cnc.cnc-shop--running .mon-machine__cnc-shop { color: #15803d; }
.mon-machine__cnc.cnc-shop--alarm .mon-machine__cnc-shop { color: #b91c1c; }
.mon-machine__cnc.cnc-shop--offline .mon-machine__cnc-shop { color: #64748b; }
.mon-machine__cnc[data-cnc-open] { cursor: pointer; }
.mon-machine__cnc-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
}
.cnc-panel__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.cnc-panel__pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.cnc-panel[data-shop="running"] .cnc-panel__pill:first-child { background: #dcfce7; color: #166534; }
.cnc-panel[data-shop="wait"] .cnc-panel__pill:first-child { background: #dbeafe; color: #1d4ed8; }
.cnc-panel[data-shop="idle"] .cnc-panel__pill:first-child { background: #fef3c7; color: #92400e; }
.cnc-panel[data-shop="alarm"] .cnc-panel__pill:first-child { background: #fee2e2; color: #991b1b; }
.cnc-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cnc-panel__grid article[hidden] { display: none; }
.cnc-panel__grid article {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.cnc-panel__grid small {
  display: block;
  color: #64748b;
  font-size: 10px;
}
.cnc-panel__grid article.is-cycle em {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  color: #166534;
}
.cnc-panel__grid article.is-cycle em[hidden] { display: none; }
.cnc-panel__grid b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}
.cnc-panel__alarm {
  display: block;
  margin-top: 10px;
  color: #b91c1c;
  font-style: normal;
  font-weight: 600;
}
.cnc-panel__sync-warn {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: #fffbeb;
}
.cnc-panel__today,
.cnc-panel__hist {
  margin-top: 16px;
}
.cnc-panel__today h3,
.cnc-panel__hist h3 {
  margin: 0 0 8px;
  font-size: 13px;
}
.cnc-panel__today h3 small {
  margin-left: 6px;
  color: #94a3b8;
  font-weight: 500;
}
.cnc-panel__bar {
  display: grid;
  grid-template-columns: 90px 1fr 72px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
}
.cnc-panel__bar i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}
.cnc-panel__bar--run i { background: #16a34a; }
.cnc-panel__bar--wait i { background: #64748b; }
.cnc-panel__bar--idle i { background: #64748b; }
.cnc-panel__bar--alarm i { background: #dc2626; }
.cnc-panel__bar--offline i { background: #475569; }
.cnc-panel__bar--setup i { background: #d97706; }
.cnc-panel__bar--oee i { background: #0f766e; }
.cnc-panel__bar--uptime i { background: #16a34a; }
.cnc-panel__oee-meta {
  margin: -2px 0 10px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}
.cnc-panel__hist ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 240px;
  overflow: auto;
}
.cnc-panel__hist li {
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}
.cnc-panel__hist time {
  color: #64748b;
  margin-right: 8px;
}
@media (max-width: 800px) {
  .cnc-panel__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mon-machine__cnc-meta {
  display: inline-block;
  margin-top: 4px;
  margin-right: 8px;
  color: #475569;
}

/* ?????????????????????????????: ??????????????????????????????????????????? ???? ?????????????????????????????????? ????????????????????????????? */
.home-stats {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}
.home-stats__kpi {
  margin-bottom: 0;
}
.home-stats__charts .panel__header {
  margin-bottom: 0;
}
.home-stats__chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, .75fr);
  gap: 18px;
  padding: 0 20px 20px;
  align-items: stretch;
}
.home-stats__chart {
  position: relative;
  height: 280px;
  min-height: 280px;
}
.home-stats__chart canvas {
  width: 100% !important;
  height: 100% !important;
}
.home-stats__chart--donut {
  width: 100%;
  height: 280px;
  justify-self: stretch;
  max-width: none;
}
.dashboard-grid--incidents {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 8px;
}
[data-home-count],
.mon-kpi [data-k] {
  font-variant-numeric: tabular-nums;
}
.home-machines {
  overflow: hidden;
}
.home-machines .panel__header {
  margin-bottom: 0;
}
.home-machines__workshop {
  padding: 0 20px 20px;
}
.home-machines__workshop + .home-machines__workshop {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.home-machines__workshop h3 {
  margin: 0 0 12px;
  font-size: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.home-machines__workshop h3 small {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.home-machines__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.home-machine-card {
  margin: 0;
}
.home-machine-card--row {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) minmax(160px, .7fr) minmax(280px, 1.4fr);
  gap: 14px 18px;
  align-items: center;
  padding: 12px 14px 12px 16px;
}
.home-machine-card--row::before {
  border-radius: 12px 0 0 12px;
}
.home-machine-card__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.home-machine-card__identity .rcm-card__title {
  min-width: 0;
}
.home-machine-card__identity .rcm-card__title-row {
  flex-wrap: wrap;
  gap: 6px 8px;
}
.home-machine-card__identity h3 {
  font-size: 15px;
  margin: 0;
}
.home-machine-card__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  text-align: center;
}
.home-machine-card__metrics > div {
  padding: 6px 4px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
}
.home-machine-card__metrics small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.home-machine-card__metrics b {
  font-size: 15px;
}
.home-machine-card__bar {
  height: 5px;
  margin: 8px 0 0;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}
.home-machine-card__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.home-machine-card__charts {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: end;
  padding: 0;
  min-width: 0;
}
.home-machine-card__chart {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
}
.home-machine-card__chart span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.home-machine-card__chart--wide {
  justify-items: stretch;
}
.home-machine-card__act {
  position: relative;
  width: 100%;
  height: 84px;
}
.home-machine-card__act canvas {
  width: 100% !important;
  height: 100% !important;
}
.home-gauge {
  position: relative;
  width: 88px;
  height: 56px;
}
.home-gauge canvas {
  display: block;
  width: 88px !important;
  height: 56px !important;
}
.home-gauge b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  display: grid;
  place-items: center;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}
.home-machine-card__incident {
  display: block;
  margin: 8px 0 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-style: normal;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .home-machine-card--row {
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.2fr);
  }
  .home-machine-card__metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .home-machine-card__charts {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .home-stats__chart-grid {
    grid-template-columns: 1fr;
  }
  .home-stats__chart,
  .home-stats__chart--donut {
    height: 240px;
    min-height: 240px;
    max-width: none;
  }
}
@media (max-width: 640px) {
  .home-machine-card--row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-machine-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-machine-card__charts {
    grid-template-columns: 1fr 1fr;
  }
  .home-machine-card__chart--wide {
    grid-column: 1 / -1;
  }
  .home-machine-card__act {
    height: 96px;
  }
}

/* ===== ???????????????????????????????????? ?????????????????????????????????????? ===== */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, .48);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.sidebar-open {
  overflow: hidden;
  touch-action: none;
}
body.sidebar-open .sidebar-backdrop {
  display: block;
}

@media (max-width: 900px) {
  html {
    overflow-x: hidden;
    overflow-x: clip;
  }
  html, body {
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
    overflow-x: clip;
  }
  .admin-shell {
    overflow-x: hidden;
    overflow-x: clip;
    width: 100%;
  }
  .sidebar {
    width: min(88vw, 300px);
    z-index: 40;
    transform: translateX(-105%);
    box-shadow: none;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(0, 0, 0, .28);
  }
  .admin-main {
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    min-width: 0;
  }
  .menu-button {
    display: grid !important;
    flex: 0 0 auto;
  }
  .topbar {
    --topbar-h: 64px;
    height: auto;
    min-height: var(--topbar-h);
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    gap: 8px;
    flex-wrap: nowrap;
    background: #fff;
  }
  .breadcrumbs {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0 !important;
  }
  .breadcrumbs span {
    font-size: 8px;
  }
  .breadcrumbs b {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .topbar__right {
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
  }
  .live-pill,
  .system-time,
  .user-menu > div,
  .user-menu > a:not(.avatar) {
    display: none !important;
  }
  .user-menu {
    min-width: 0 !important;
    width: auto;
    gap: 0;
  }
  .admin-content {
    padding: 14px 12px max(28px, env(safe-area-inset-bottom, 0px));
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-x: clip;
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }
  .page-heading h1 {
    font-size: clamp(22px, 6vw, 28px);
    word-break: break-word;
  }
  .page-heading .button,
  .page-heading .button-row,
  .page-heading .heading-actions {
    width: 100%;
  }
  .page-heading .heading-actions {
    flex-wrap: wrap;
  }
  .page-heading .button {
    justify-content: center;
  }
  .stat-grid,
  .dashboard-stat-grid,
  .entity-summary,
  .dash-home-cards,
  .home-stats__kpi {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .metric {
    min-height: 0;
    padding: 14px;
    gap: 10px;
  }
  .metric strong {
    font-size: 20px;
  }
  .production-strip {
    grid-template-columns: 1fr !important;
  }
  .production-strip a {
    border-left: 0;
    border-top: 1px solid #30363e;
  }
  .form-grid,
  .settings-layout,
  .profile-layout,
  .profile-hero,
  .dashboard-grid,
  .dashboard-grid--wide,
  .schedules-calendar-layout,
  .mon-grid--2,
  .mon-oee {
    grid-template-columns: 1fr !important;
  }
  .pl-toolbar {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .shift-rc-toolbar,
  .ops-history-toolbar,
  .heading-actions {
    flex-wrap: wrap;
  }
  .shift-rc-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .shift-rc-toolbar .button,
  .shift-rc-toolbar form {
    width: 100%;
  }
  .settings-tabs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    flex-direction: row !important;
  }
  .settings-tabs button {
    flex: 1 1 calc(50% - 6px);
  }
  .table-panel,
  .panel.table-panel,
  .admin-content .panel,
  .admin-content > * {
    max-width: 100%;
    min-width: 0;
  }
  .table-panel,
  .table-scroll,
  .setup-history-panel,
  .calendar-panel,
  .ops-history-panel,
  .ops-history-panel .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .ops-history-table {
    table-layout: auto;
    min-width: 0;
  }
  .data-table {
    min-width: 640px;
  }
  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }
  /* iOS: ???????????? zoom ???????????? ????????????????????????? ???????? ???????????????? */
  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .auth-card input,
  .auth-card select,
  .role-fields input,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  select,
  textarea {
    font-size: 16px !important;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-actions .button {
    flex: 1 1 auto;
  }
  .rcm-card,
  .scm-card--compact {
    overflow: hidden;
  }
  .rcm-card__head,
  .scm-compact__head {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
  .rcm-pos__grid,
  .rcm-cells__row--1,
  .rcm-cells__row--2,
  .rcm-info,
  .rcm-times {
    grid-template-columns: 1fr 1fr !important;
  }
  .rcm-gantt {
    --rcm-label-w: 52px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .rcm-crew,
  .scm-compact__actions,
  .shift-setup-complete {
    flex-wrap: wrap;
  }
  .shift-setup-complete label {
    flex: 1 1 100%;
    min-width: 0;
  }
  .modal {
    top: max(12px, env(safe-area-inset-top, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: 8px;
    right: 8px;
    width: auto !important;
    max-width: none;
    height: auto !important;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }
  .modal[open] {
    display: flex;
    flex-direction: column;
  }
  .modal__card,
  .modal--wide .modal__card,
  .modal--sm .modal__card,
  .modal--qc .modal__card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .modal .form-grid {
    grid-template-columns: 1fr !important;
  }
  .notify-dropdown,
  .notify-dropdown--portal {
    position: fixed !important;
    top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(70dvh, 420px) !important;
    z-index: 1200 !important;
  }
  .topbar {
    overflow: visible;
  }
  .incident-filters,
  .shift-rc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .schedules-mini-stats {
    grid-template-columns: 1fr 1fr !important;
  }
  .admin-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    gap: 8px;
  }
  .home-machines__grid {
    grid-template-columns: 1fr !important;
  }
  .home-machine-card--row {
    grid-template-columns: 1fr !important;
  }
  .button,
  .icon-button,
  .sidebar__nav a,
  .nav-group > summary {
    min-height: 44px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
  }
  .button {
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .table-panel .table-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    height: auto;
    min-height: 0;
  }
  .table-panel .table-tools .search-field {
    width: 100%;
    max-width: 100%;
  }
  .incident-table {
    min-width: 0 !important;
    table-layout: auto !important;
  }
  .incident-table thead {
    display: none;
  }
  .incident-table,
  .incident-table tbody,
  .incident-table tr.incident-row,
  .incident-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .incident-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px 14px;
  }
  .incident-table tr.incident-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line, #d8e0e8);
    border-radius: 14px;
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
  }
  .incident-table tr.incident-row td {
    width: auto !important;
    padding: 0;
    border: 0;
    word-break: normal;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  /* Mobile cards: # ???? status ???? machine ???? author only */
  .incident-table tr.incident-row td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-size: 14px;
  }
  .incident-table tr.incident-row td:nth-child(5) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  .incident-table tr.incident-row td:nth-child(3),
  .incident-table tr.incident-row td:nth-child(6) {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #4b5560;
  }
  .incident-table tr.incident-row td:nth-child(3)::before { content: "Станок · "; color: #8a9199; font-weight: 700; }
  .incident-table tr.incident-row td:nth-child(6)::before { content: "Автор · "; color: #8a9199; font-weight: 700; }
  .incident-table tr.incident-row td:nth-child(2),
  .incident-table tr.incident-row td:nth-child(4),
  .incident-table tr.incident-row td:nth-child(7),
  .incident-table tr.incident-row td:nth-child(8) { display: none !important; }
}

@media (max-width: 560px) {
  .stat-grid,
  .dashboard-stat-grid,
  .entity-summary,
  .dash-home-cards,
  .home-stats__kpi,
  .schedules-mini-stats,
  .month-summary,
  .rc-dash .ops-dash__stats,
  .rc-dash .ops-dash__stats:has(article:nth-child(6)),
  .setup-dash .ops-dash__stats {
    grid-template-columns: 1fr !important;
  }
  .rcm-pos__grid,
  .rcm-cells__row--1,
  .rcm-cells__row--2,
  .rcm-info,
  .rcm-times {
    grid-template-columns: 1fr !important;
  }
  .month-calendar {
    grid-template-columns: repeat(7, minmax(44px, 1fr));
  }
  .auth-form-wrap {
    padding: 16px 12px;
    min-height: 100dvh;
  }
  .auth-card {
    width: 100%;
    margin: 0;
    padding: 20px 16px;
  }
  .auth-card h2 {
    font-size: 24px;
  }
}



/* Android app shell: полный сайт, боковое меню по ролям как в браузере */
.admin-body.is-android-app .admin-shell {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
.admin-body.is-android-app .admin-main {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100dvh;
}
.admin-body.is-android-app .sidebar {
  position: fixed !important;
  transform: translateX(-105%);
  z-index: 40;
  width: min(88vw, 300px);
  display: flex !important;
}
.admin-body.is-android-app .sidebar.open,
.admin-body.is-android-app body.sidebar-open .sidebar,
body.sidebar-open.admin-body.is-android-app .sidebar {
  transform: translateX(0);
}
.admin-body.is-android-app .menu-button,
.admin-body.is-android-app [data-sidebar-toggle] {
  display: grid !important;
}
.admin-body.is-android-app .sidebar__app-download {
  display: none !important;
}
html.amo-android-app .auth-app-download {
  display: none !important;
}
.admin-body.is-android-app .topbar {
  padding-left: 12px !important;
  gap: 8px;
}
.admin-body.is-android-app .topbar .user-menu > div,
.admin-body.is-android-app .topbar .system-time span {
  display: none;
}
.admin-body.is-android-app .admin-content {
  padding: 12px 12px 24px !important;
}
.admin-body.is-android-app .profile-hero {
  flex-wrap: wrap;
  padding: 18px !important;
}
.admin-body.is-android-app .profile-meta {
  padding-left: 0;
  border-left: 0;
  width: 100%;
}

/* Android app ?????? ??????????????????. ?????????????????????????????????????????????????????? ?????????????????? ?????????????????????????????????????????? */
.admin-body.is-android-app .topbar .live-pill,
.admin-body.is-android-app .topbar .system-time {
  display: none !important;
}
.admin-body.is-android-app .topbar .user-menu b,
.admin-body.is-android-app .topbar .user-menu small {
  display: none !important;
}
.admin-body.is-android-app .ops-dash__stats {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.admin-body.is-android-app .rcm-list,
.admin-body.is-android-app .profile-shift-list {
  gap: 10px !important;
}
.admin-body.is-android-app .button {
  min-height: 40px;
}

/* Android app v1.4 ?????? ???????????????????????????????????? ???????????? ?????????????????????????????????????????????????????? ????????????????????????????????????/???????????????????????????????????? */
.admin-body.is-android-app *,
.admin-body.is-android-app *::before,
.admin-body.is-android-app *::after { box-sizing: border-box; }
.admin-body.is-android-app {
  overflow-x: hidden !important;
}
.admin-body.is-android-app .admin-content,
.admin-body.is-android-app .panel,
.admin-body.is-android-app .rcm-card,
.admin-body.is-android-app .psc {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}
.admin-body.is-android-app .panel.table-panel {
  overflow-x: visible !important;
}
.admin-body.is-android-app .table-scroll {
  overflow-x: auto !important;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.admin-body.is-android-app .button,
.admin-body.is-android-app .heading-actions .button,
.admin-body.is-android-app .shift-rc-toolbar .button {
  max-width: 100% !important;
  white-space: normal !important;
  height: auto !important;
  min-height: 40px;
  line-height: 1.2;
}
.admin-body.is-android-app .rcm-cells__row--1,
.admin-body.is-android-app .rcm-cells__row--2,
.admin-body.is-android-app .psc__meta {
  grid-template-columns: 1fr !important;
}
.admin-body.is-android-app .rcm-cell b,
.admin-body.is-android-app .psc__meta b,
.admin-body.is-android-app h1,
.admin-body.is-android-app h2,
.admin-body.is-android-app h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Android / narrow: incidents as cards (avoid crushed fixed table columns) */
.admin-body.is-android-app .table-tools {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  height: auto;
  min-height: 0;
}
.admin-body.is-android-app .table-tools .search-field {
  width: 100%;
  max-width: 100%;
}
.admin-body.is-android-app .incident-table,
.admin-body.is-android-app .incident-table thead,
.admin-body.is-android-app .incident-table tbody,
.admin-body.is-android-app .incident-table tr,
.admin-body.is-android-app .incident-table th,
.admin-body.is-android-app .incident-table td {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  table-layout: auto !important;
}
.admin-body.is-android-app .incident-table {
  overflow: visible !important;
  border: 0 !important;
  min-width: 0 !important;
}
.admin-body.is-android-app .incident-table thead {
  display: none !important;
}
.admin-body.is-android-app .incident-table tbody {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 14px;
}
.admin-body.is-android-app .incident-table tr.incident-row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line, #d8e0e8);
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
}
.admin-body.is-android-app .incident-table tr.incident-row td {
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
  white-space: normal !important;
}
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-size: 14px;
}
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(5) {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
}
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(3),
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(6) {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #4b5560;
}
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(3)::before {
  content: "Станок · ";
  color: #8a9199;
  font-weight: 700;
}
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(6)::before {
  content: "Автор · ";
  color: #8a9199;
  font-weight: 700;
}
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(2),
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(4),
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(7),
.admin-body.is-android-app .incident-table tr.incident-row td:nth-child(8) {
  display: none !important;
}

/* Android WebView: modal must scroll inside the card */
.admin-body.is-android-app.amo-modal-open,
.admin-body.is-android-app.amo-modal-open .admin-main,
.admin-body.is-android-app.amo-modal-open .admin-content {
  overflow: hidden !important;
}
.admin-body.is-android-app dialog.modal[open] {
  position: fixed !important;
  inset: 8px !important;
  top: 8px !important;
  right: 8px !important;
  bottom: 8px !important;
  left: 8px !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: calc(100dvh - 16px) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 2000 !important;
}
.admin-body.is-android-app dialog.modal[open] .modal__card {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
}

/* WIKI: меню статей сверху, чат отдельно */
.admin-body[data-page="wiki"] .admin-content {
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}
.admin-body[data-page="wiki"] .admin-content > .page-heading {
  flex: 0 0 auto;
  margin-bottom: 16px;
}
.wiki-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 480px;
  height: calc(100dvh - var(--topbar-h) - 150px);
  max-height: calc(100dvh - var(--topbar-h) - 110px);
  overflow: hidden;
  padding: 0;
}
.wiki-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f8fa;
}
.wiki-topnav__title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.wiki-topnav__actions {
  flex: 0 0 auto;
}
.wiki-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  background: #fff;
}
.wiki-chat {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.wiki-chat[hidden] { display: none !important; }
.wiki-chat__thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(900px 280px at 100% 0%, rgba(26, 168, 150, 0.05), transparent 55%),
    #fff;
}
.wiki-msg {
  display: flex;
  max-width: min(720px, 94%);
}
.wiki-msg--user { align-self: flex-end; }
.wiki-msg--bot { align-self: flex-start; }
.wiki-msg__bubble {
  padding: 11px 13px;
  border-radius: 14px;
  background: #f3f5f7;
  color: #2a313a;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.wiki-msg--user .wiki-msg__bubble {
  background: #171b20;
  color: #f5f6f7;
}
.wiki-msg__bubble b {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .7;
}
.wiki-msg__bubble p { margin: 0; }
.wiki-msg__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}
.wiki-msg__suggestions button {
  border: 1px solid #e4e7eb;
  background: #f8fafc;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
}
.wiki-msg__suggestions button:hover { border-color: var(--accent); }
.wiki-chat__composer {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  flex: 0 0 auto;
}
.wiki-chat__composer input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
}
@media (max-width: 960px) {
  .wiki-shell {
    height: auto;
    max-height: none;
    min-height: 70vh;
  }
  .wiki-chat__thread { min-height: 280px; }
}

/* Android home / panels polish */
.admin-body.is-android-app .admin-content {
  padding-left: 12px !important;
  padding-right: 12px !important;
}
.admin-body.is-android-app .panel {
  border-radius: 14px;
}
.admin-body.is-android-app .panel__header {
  padding: 14px 14px !important;
  align-items: flex-start !important;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-body.is-android-app .dash-home-list {
  padding: 2px 10px 12px !important;
}
.admin-body.is-android-app .dash-home-list__row {
  align-items: flex-start !important;
  padding: 12px 4px !important;
}
.admin-body.is-android-app .dash-home-card {
  min-height: 92px !important;
  padding: 14px !important;
}
.admin-body.is-android-app .dash-home-cards,
.admin-body.is-android-app .dash-home-lists,
.admin-body.is-android-app .dash-home-next {
  margin-bottom: 14px !important;
}
.admin-body.is-android-app .page-heading .heading-actions {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}
.admin-body.is-android-app .page-heading .heading-actions .button {
  width: 100%;
  justify-content: center;
}
.admin-body.is-android-app .director-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.admin-body.is-android-app .director-kpis article {
  padding: 12px !important;
}
.admin-body.is-android-app ul:not([class]) {
  margin: 0;
  padding: 10px 16px 14px 28px;
}
.admin-body.is-android-app[data-page="messages"] .sn-profile {
  display: none !important;
}
.admin-body.is-android-app[data-page="messages"] .social-chat-panel--page,
.admin-body.is-android-app[data-page="messages"] .social-chat {
  border-top: 0;
}
.admin-body.is-android-app[data-page="messages"] .social-chat--thread .social-chat__back {
  display: grid !important;
}

/* Cookie consent banner */
.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  z-index: 10000;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.cookie-consent__inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
}
.cookie-consent__message {
  flex: 1 1 auto;
  min-width: 0;
}
.cookie-consent__title {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.cookie-consent__text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.cookie-consent__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-top: 2px;
}
.cookie-consent__accept {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .cookie-consent__inner {
    flex-direction: column;
  }
  .cookie-consent__actions {
    width: 100%;
    padding-top: 6px;
  }
  .cookie-consent__accept {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Global design v2 (monitoring-style) ===== */
:root {
  --bg: #eef2f6;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .04);
  --shadow-lg: 0 8px 32px rgba(15, 118, 110, .12);
  --radius: 16px;
}

.admin-body { background: var(--bg); }
.admin-main { background: var(--bg); }
.admin-content {
  padding: 24px 28px 48px;
}

/* Hero page headings (all admin pages except monitoring) */
.admin-content > .page-heading,
.admin-content > .page-heading--hero {
  position: relative;
  display: flex;
  margin: 0 0 20px;
  padding: 22px 24px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(45, 212, 191, .2), transparent 55%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(59, 130, 246, .1), transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.admin-content > .page-heading .page-heading__main,
.admin-content > .page-heading > div:first-child {
  min-width: 0;
  max-width: min(820px, 100%);
}
.admin-content > .page-heading .eyebrow {
  margin-bottom: 8px;
  color: #99f6e4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.admin-content > .page-heading h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.admin-content > .page-heading p {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}
.admin-content > .page-heading .page-heading__aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.admin-content > .page-heading .heading-actions,
.admin-content > .page-heading .page-heading__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
}
.admin-content > .page-heading .button--ghost,
.admin-content > .page-heading .button--secondary,
.admin-content > .page-heading a.button {
  color: #0f172a !important;
  background: rgba(255, 255, 255, .95) !important;
  border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}
.admin-content > .page-heading .button--ghost:hover,
.admin-content > .page-heading .button--secondary:hover,
.admin-content > .page-heading a.button:hover {
  background: #fff !important;
  color: #0f172a !important;
}
.admin-content > .page-heading .button--primary {
  color: #fff !important;
  background: var(--accent) !important;
  border-color: var(--accent-dark) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset;
}

/* KPI cards */
.stat-grid,
.dashboard-stat-grid {
  gap: 12px;
  margin-bottom: 20px;
}
.metric {
  min-height: auto;
  padding: 14px 16px;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
  transition: transform .15s, box-shadow .15s;
}
.metric:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07) !important;
}
.metric__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
}
.metric strong { font-size: 24px; font-weight: 800; }
.metric small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.metric em { font-size: 10px; color: #64748b; line-height: 1.35; }

.dashboard-kpis a,
.dashboard-kpis div,
.director-kpis article,
.ops-dash__stats article,
.pl-kpi,
.dash-home-card,
.mon-kpi-v2__card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}
.dashboard-kpis a:hover,
.dash-home-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07) !important;
}

/* Panels */
.admin-content .panel,
.admin-content .metric,
.admin-content .pl-tile,
.admin-content .pl-kpi,
.admin-content .pl-tile__note,
.admin-content .rcm-card,
.admin-content .prod-card,
.admin-content .omd-card,
.admin-content .omd-filters,
.admin-content .schedules-mini-stats article,
.admin-content .schedules-hint,
.admin-content .schedules-compact,
.admin-content .empty-state--rich,
.admin-content .profile-side-panel,
.admin-content .machine-tile,
.admin-content .home-machine-card.panel,
.tablet-pin__card,
.tablet-pin__job,
.auth-card,
.install-card,
.error-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
  overflow: hidden;
}
.admin-content .panel__header {
  padding: 16px 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%) !important;
  box-shadow: none !important;
}
.admin-content .panel__header h2 {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}
.admin-content .panel__header p {
  font-size: 12px;
  color: #64748b;
}

/* Topbar & sidebar polish */
.topbar {
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
.sidebar__nav a.active {
  background: rgba(26, 168, 150, .14);
  box-shadow: inset 0 0 0 1px rgba(26, 168, 150, .2);
}

/* Tables */
.data-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.data-table tbody tr:hover { background: #f8fafc; }

/* Section spacing in admin */
.admin-content > section,
.admin-content > .mon-section,
.admin-content > .mon-grid,
.admin-content > .mon-page,
.admin-content > .dashboard-grid,
.admin-content > .settings-layout,
.admin-content > .profile-layout {
  margin-bottom: 20px;
}

/* Auth & kiosk */
.auth-card,
.tablet-pin__card,
.install-card {
  box-shadow: 0 8px 32px rgba(15, 23, 42, .1) !important;
}
.auth-visual {
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(45, 212, 191, .22), transparent 55%),
    linear-gradient(135deg, #0f172a 0%, #134e4a 48%, #0f766e 100%) !important;
}

/* Monitoring page inherits mon-page; avoid double hero on nested headings */
.mon-page .page-heading--hero {
  display: none;
}

/* Ops / shift sub-nav */
.ops-dash__nav,
.mon-view-tabs,
.entity-tabs,
.schedules-hub__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ops-dash__nav a,
.mon-view-tabs .button,
.entity-tabs a,
.schedules-hub__tabs a {
  border-radius: 999px !important;
  font-weight: 700;
}
.ops-dash__nav a.is-active,
.mon-view-tabs .button.is-active,
.entity-tabs a.is-active {
  background: #ecfdf5 !important;
  color: #0f766e !important;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}
.ops-dash__print-btn {
  margin-left: auto;
  border-radius: 999px !important;
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #fff !important;
  font-weight: 700;
}
.ops-dash__print-btn:hover {
  background: #0d9488;
}

.alert {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.admin-footer {
  border-top: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
}
.wiki-shell.panel,
.settings-layout > .panel {
  border-radius: 16px;
}
.admin-content > .page-heading--plain {
  background: #fff;
  color: var(--text);
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.admin-content > .page-heading--plain h1 { color: #0f172a; }
.admin-content > .page-heading--plain p { color: #64748b; }
.admin-content > .page-heading--plain .eyebrow { color: var(--accent-dark); }
.admin-content > .page-heading--plain .heading-actions {
  background: #f8fafc;
  border-color: #e2e8f0;
}

@media (max-width: 980px) {
  .admin-content > .page-heading,
  .admin-content > .page-heading--hero {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-content > .page-heading .page-heading__aside,
  .admin-content > .page-heading .heading-actions {
    width: 100%;
    align-items: stretch;
  }
  .admin-content {
    padding: 16px 14px 40px;
  }
}

/* Enterprise suite: APS / ERP / QMS / BI / traceability */
.admin-content > .ent-page {
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}
.ent-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ent-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, .28);
  box-shadow: 0 10px 36px rgba(15, 23, 42, .12);
}
.ent-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 120% at 100% -10%, rgba(45, 212, 191, .28), transparent 55%),
    radial-gradient(ellipse 50% 80% at 0% 110%, rgba(59, 130, 246, .18), transparent 50%),
    linear-gradient(135deg, #0b1220 0%, #134e4a 52%, #0f766e 100%);
}
.ent-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 22px 24px 20px;
  color: #fff;
}
.ent-hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #99f6e4;
  margin-bottom: 8px;
}
.ent-hero h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: #fff;
}
.ent-hero__lead {
  margin: 8px 0 0;
  max-width: 52rem;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .78);
}
.ent-hero__side { min-width: min(100%, 320px); }
.ent-hero__stats { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ent-hero__stat {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  text-align: right;
}
.ent-hero__stat small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .65);
}
.ent-hero__stat b { display: block; font-size: 22px; line-height: 1.2; }
.ent-hero__stat em { font-style: normal; font-size: 12px; color: rgba(255, 255, 255, .7); }
.ent-hero__stat.is-alert { background: rgba(185, 28, 28, .35); }
.ent-hero__stat.is-ok { background: rgba(16, 185, 129, .22); }
.ent-hero-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
}
.ent-hero-search input[type="search"],
.ent-hero-search input[type="date"] {
  min-width: 140px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
}
.ent-hero-search input[type="search"] { min-width: 220px; flex: 1; }
.ent-hero-search--dates label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.ent-hero .button {
  height: 38px;
  padding: 0 16px;
}
.ent-hero .button--primary {
  background: #fff;
  color: #0f766e;
  border: 0;
}
.ent-hero .button--primary:hover {
  background: #ecfdf5;
  color: #115e59;
}
.ent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ent-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.ent-tabs a:hover { background: #f1f5f9; color: #0f172a; }
.ent-tabs a.is-active {
  background: #0f766e;
  color: #fff;
}
.ent-tabs a.is-active:hover { background: #0d9488; color: #fff; }
.ent-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.ent-stats article {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ent-stats small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ent-stats b {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: -.03em;
  color: #0f172a;
}
.ent-stats em {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-style: normal;
  color: #64748b;
}
.ent-stats .is-ok b { color: #0f766e; }
.ent-stats .is-alert b { color: #b91c1c; }
.ent-stats .is-warn b { color: #c2410c; }
.ent-panel {
  padding: 16px 18px 18px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ent-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.ent-panel__head h2 { margin: 0; font-size: 17px; }
.ent-panel__head p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.ent-empty {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}
.ent-muted { color: #64748b; font-size: 13px; }
.ent-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ent-pill.is-ok { background: #d1fae5; color: #065f46; }
.ent-pill.is-warn { background: #ffedd5; color: #9a3412; }
.ent-pill.is-bad { background: #fee2e2; color: #991b1b; }
.ent-hot, .ent-log, .ent-capa, .ent-scrap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ent-hot li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 10px 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.ent-log li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.ent-hot__n {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}
.ent-hot strong, .ent-log strong { display: block; }
.ent-hot span, .ent-log span, .ent-hot em, .ent-hot small {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}
.ent-hot b { font-size: 13px; }
.ent-machines { display: flex; flex-direction: column; gap: 14px; }
.ent-mcard {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ent-mcard.is-over { border-color: #fecaca; }
.ent-mcard__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 8px;
}
.ent-mcard__head h2 { margin: 0; font-size: 18px; }
.ent-mcard__head p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.ent-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: conic-gradient(#0f766e calc(var(--p, 0) * 1%), #e2e8f0 0);
  position: relative;
  flex: 0 0 auto;
}
.ent-mcard.is-over .ent-ring { background: conic-gradient(#b91c1c calc(var(--p, 0) * 1%), #fee2e2 0); }
.ent-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}
.ent-ring b, .ent-ring small {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.1;
}
.ent-ring b { font-size: 14px; }
.ent-ring small {
  display: block;
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ent-mcard__bar { height: 6px; background: #e2e8f0; }
.ent-mcard__bar i { display: block; height: 100%; background: #0f766e; }
.ent-mcard.is-over .ent-mcard__bar i { background: #b91c1c; }
.ent-jobs { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 16px; }
.ent-job {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ent-job__top { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.ent-pri {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.ent-job__title { flex: 1; min-width: 0; }
.ent-job__title strong { display: block; }
.ent-job__title span { color: #64748b; font-size: 12px; }
.ent-job__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}
.ent-job__meta dt {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #94a3b8;
}
.ent-job__meta dd { margin: 0; font-weight: 700; font-size: 13px; }
.ent-job__meta small { font-weight: 600; color: #64748b; }
.ent-mini { height: 4px; border-radius: 99px; background: #e2e8f0; margin-top: 10px; overflow: hidden; }
.ent-mini i { display: block; height: 100%; background: #0f766e; }
.ent-job__form {
  display: grid;
  grid-template-columns: 90px 150px 1fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}
.ent-job__form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.ent-job__form input {
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
}
.ent-job__note { min-width: 0; }
.ent-note { margin: 8px 0 0; font-size: 12px; color: #475569; }
.ent-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 14px;
}
.ent-split--wide { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.ent-endpoint {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 13px;
  word-break: break-all;
}
.ent-endpoint span { font-size: 10px; font-weight: 800; color: #64748b; }
.ent-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.ent-methods article {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ent-methods b { display: block; margin-bottom: 4px; }
.ent-methods p { margin: 0; font-size: 12px; color: #64748b; }
.ent-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ent-filter--sub { margin-top: -4px; }
.ent-filter a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.ent-filter a b { color: #0f766e; }
.ent-filter a:hover { border-color: #0f766e; }
.ent-filter a.is-active { background: #0f766e; border-color: #0f766e; color: #fff; }
.ent-filter a.is-active b { color: #fff; }
.ent-orders, .ent-docs, .ent-ncrs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.ent-order, .ent-doc, .ent-ncr, .ent-chip {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.ent-ncr.is-open { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
.ent-order header, .ent-doc header, .ent-ncr header {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ent-order p, .ent-ncr p, .ent-doc p { margin: 0 0 8px; }
.ent-order dl, .ent-doc dl, .ent-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.ent-order dt, .ent-doc dt, .ent-dl dt {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #94a3b8;
}
.ent-order dd, .ent-doc dd, .ent-dl dd { margin: 0; font-weight: 700; }
.ent-order__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ent-error { margin: 8px 0 0; color: #b91c1c; font-size: 12px; }
.ent-link { display: inline-block; margin-top: 10px; font-weight: 700; }
.ent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ent-chip { text-decoration: none; color: inherit; min-width: 160px; }
.ent-chip:hover { border-color: #0f766e; }
.ent-chip strong { display: block; }
.ent-chip span { color: #64748b; font-size: 12px; }
.ent-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ent-timeline li {
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed #cbd5e1;
}
.ent-timeline li.is-done { border-style: solid; border-color: #99f6e4; background: #f0fdfa; }
.ent-timeline li.is-wait { opacity: .7; }
.ent-timeline li { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ent-timeline__head { display: flex; align-items: center; gap: 8px; }
.ent-timeline__head i {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  background: #e2e8f0;
  color: #475569;
}
.ent-timeline li.is-done .ent-timeline__head i { background: #0d9488; color: #fff; }
.ent-timeline__head b { font-size: 13px; color: #0f172a; }
.ent-timeline__value { font-size: 20px; font-weight: 800; color: #0f172a; line-height: 1.1; }
.ent-timeline__rows { margin: 0; display: grid; gap: 3px; }
.ent-timeline__rows div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  border-top: 1px dashed rgba(148, 163, 184, .45);
  padding-top: 3px;
}
.ent-timeline__rows dt { color: #64748b; font-weight: 600; }
.ent-timeline__rows dd { margin: 0; color: #0f172a; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.ent-timeline__rows div.is-note dd { color: #64748b; font-weight: 600; text-align: left; }
.ent-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ent-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.ent-form input, .ent-form select, .ent-form textarea {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.ent-span-2 { grid-column: 1 / -1; }
.ent-form__actions { grid-column: 1 / -1; }
.ent-desc { margin: 6px 0 0; font-size: 13px; color: #475569; }
.ent-capa li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.ent-capa li.is-done { background: #f0fdfa; }
.ent-capa strong { display: block; }
.ent-capa span { font-size: 12px; color: #64748b; }
.ent-table tfoot th { background: #f8fafc; }
.ent-legend {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: #64748b;
}
.ent-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 4px;
}
.ent-legend .is-plan { background: #94a3b8; }
.ent-legend .is-done { background: #0f766e; }
.ent-legend .is-scrap { background: #ea580c; }
.ent-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding: 8px 4px 0;
}
.ent-chart__col {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
}
.ent-chart__col span {
  position: absolute;
  bottom: 22px;
  width: 28%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
}
.ent-chart__col .is-plan { left: 8%; background: #94a3b8; }
.ent-chart__col .is-done { left: 38%; background: #0f766e; }
.ent-chart__col .is-scrap { left: 68%; background: #ea580c; }
.ent-chart__col small {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: #64748b;
}
.ent-scrap li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}
.ent-scrap strong { display: block; }
.ent-scrap span { font-size: 12px; color: #64748b; }
.ent-scrap i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background: #ea580c;
}
@media (max-width: 980px) {
  .ent-hero__inner,
  .ent-split,
  .ent-split--wide,
  .ent-timeline,
  .ent-methods,
  .ent-form,
  .ent-job__form {
    grid-template-columns: 1fr;
  }
  .ent-hot li, .ent-log li { grid-template-columns: auto minmax(0, 1fr); }
  .ent-hero__stat, .ent-hero-search { text-align: left; }
}

/* ???????? ?????????????? ???? ?????????????????? */
.machine-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  background: #e8eef0;
}
.machine-tile__photo {
  display: none;
}
.machine-photo-field {
  display: grid;
  gap: 8px;
}
.machine-photo-field > span {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.machine-photo--preview {
  width: min(100%, 320px);
  height: 120px;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
}
.machine-photo--preview[hidden] { display: none; }
.mon-machine__photo {
  margin: -14px -14px 10px -14px;
  height: 108px;
  overflow: hidden;
  background: #e8eef0;
}
.machine-photo--mon {
  width: 100%;
  height: 108px;
}
.mon-machine__pass {
  display: block;
  margin: 0 0 8px;
  color: #64748b;
  font-size: 11px;
}

.mon-board--rows,
.mon-board--compact {
  padding: 0;
  width: 100%;
}
.mon-board--rows .mon-workshop,
.mon-board--compact .mon-workshop {
  padding: 12px 14px 14px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.mon-board--rows .mon-workshop:last-child,
.mon-board--compact .mon-workshop:last-child { margin-bottom: 0; }
.mon-board--rows .mon-workshop h3,
.mon-board--compact .mon-workshop h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.mon-board--rows .mon-machine-grid,
.mon-board--compact .mon-machine-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mon-page .mon-machine--row,
.mon-page .mon-machine--compact {
  display: grid;
  grid-template-columns: 96px minmax(176px, 0.95fr) minmax(248px, 1.05fr) minmax(260px, 1.35fr) minmax(200px, 0.95fr);
  grid-template-areas: "photo id stats cnc side";
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 118px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
  border-left-width: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .04);
}
.mon-page .mon-machine--row.is-nocnc {
  grid-template-columns: 96px minmax(200px, 1.1fr) minmax(280px, 1.2fr) 88px;
  grid-template-areas: "photo id stats cnc";
}
.mon-page .mon-machine--row.mon-machine--working::before,
.mon-page .mon-machine--compact.mon-machine--working::before { display: none; }
.mon-page .mon-machine--row:hover,
.mon-page .mon-machine--compact:hover {
  transform: none;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .1);
}
.mmc__photo {
  grid-area: photo;
  flex: none;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 118px;
  border-radius: 0;
  border: none;
  overflow: hidden;
  background: #0f172a;
}
.machine-photo--mmc {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.mmc__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0f766e 0%, #0f172a 100%);
  color: #99f6e4;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.mmc__id {
  grid-area: id;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}
.mmc__id > b {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mmc__badge {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.mon-machine--free .mmc__badge { background: #dcfce7; color: #15803d; }
.mon-machine--working .mmc__badge,
.mon-machine--progress .mmc__badge { background: #e0f2fe; color: #0369a1; }
.mon-machine--setup .mmc__badge { background: #fef3c7; color: #b45309; }
.mon-machine--incident .mmc__badge { background: #fee2e2; color: #b91c1c; }
.mon-machine--idle .mmc__badge { background: #f1f5f9; color: #64748b; }
.mmc__sub {
  display: block;
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mmc__sub--pass { font-size: 10px; color: #94a3b8; }
.mmc__stats {
  grid-area: stats;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 4px;
  min-width: 0;
}
.mmc__bars3 {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 8px;
  align-items: end;
  height: 86px;
  flex: 0 0 auto;
}
.mmc__vcol {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  height: 100%;
  min-width: 0;
}
.mmc__vcol i {
  display: block;
  width: 18px;
  border-radius: 5px 5px 2px 2px;
  align-self: end;
  min-height: 6px;
}
.mmc__vcol--plan i { background: linear-gradient(180deg, #94a3b8, #64748b); }
.mmc__vcol--fact i { background: linear-gradient(180deg, #2dd4bf, #0f766e); }
.mmc__vcol--scrap i { background: linear-gradient(180deg, #fb7185, #e11d48); }
.mmc__vcol b {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-top: 4px;
}
.mmc__vcol small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.mmc__ring {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 58px;
  height: auto;
  flex: 0 0 58px;
  border-radius: 0;
  background: none;
}
.mmc__ring::before {
  content: '';
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--c, #0ea5e9) calc(var(--p, 0) * 1%), #e8eef4 0);
}
.mmc__ring::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 7px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
}
.mmc__ring span {
  position: absolute;
  top: 21px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.03em;
  line-height: 1;
}
.mmc__ring small {
  position: static;
  transform: none;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
  white-space: nowrap;
}
.mmc__cnc {
  grid-area: cnc;
  margin: 10px 8px 10px 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 10px;
  line-height: 1.3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.mmc__cnc[data-cnc-open] { cursor: pointer; }
.mmc__cnc[data-cnc-open]:hover { filter: brightness(.98); }
.mmc__cnc.is-online { border-color: #bbf7d0; background: #f0fdf4; }
.mmc__cnc.is-offline { border-color: #fecaca; background: #fef2f2; }
.mmc__cnc.is-stale { border-color: #fde68a; background: #fffbeb; }
.mmc__cnc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 0;
}
.mmc__cnc-net {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mmc__cnc.is-online .mmc__cnc-net { color: #15803d; }
.mmc__cnc-shop {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}
.mmc__cnc-shop em {
  font-style: normal;
  font-weight: 600;
  color: #94a3b8;
  font-size: 10px;
}
.mmc__cnc-shop em:not(:empty)::before { content: '· '; }
.mmc__cnc-top .cnc-panel__pill {
  font-size: 9px;
  padding: 1px 6px;
}
.cnc-mode--auto { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.cnc-mode--jog { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.cnc-mode--mda { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.mmc__cnc-ctrl {
  margin-left: auto;
  font-size: 9px;
  color: #94a3b8;
  max-width: 48%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mmc__cnc-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 0;
}
.mmc__metric {
  padding: 4px 5px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  min-width: 0;
}
.mmc__metric small {
  display: block;
  color: #94a3b8;
  font-size: 8px;
  font-weight: 700;
}
.mmc__metric b {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 750;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mmc__side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px 18px 8px;
}
.mmc__daychart {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  height: 78px;
  align-items: stretch;
}
.mmc__daycol {
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  min-width: 0;
}
.mmc__daycol i {
  display: block;
  width: 10px;
  border-radius: 4px 4px 2px 2px;
  align-self: end;
  min-height: 4px;
}
.mmc__daycol--run i { background: linear-gradient(180deg, #4ade80, #16a34a); }
.mmc__daycol--wait i { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.mmc__daycol--idle i { background: linear-gradient(180deg, #fbbf24, #d97706); }
.mmc__daycol--alarm i { background: linear-gradient(180deg, #fb7185, #e11d48); }
.mmc__daycol--offline i { background: linear-gradient(180deg, #cbd5e1, #64748b); }
.mmc__daycol b {
  font-size: 8px;
  font-weight: 800;
  color: #334155;
  line-height: 1.1;
  margin-top: 3px;
  white-space: nowrap;
}
.mmc__daycol small {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #94a3b8;
}
.mmc__hist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
}
.mmc__hist li {
  font-size: 9px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mmc__hist time {
  color: #94a3b8;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}
.mmc__hist b { color: #334155; font-weight: 700; }
.mmc__alarm {
  display: block;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  color: #b91c1c;
}
.mmc__cnc--off {
  margin: 10px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-style: dashed;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mon-machine--row.is-nocnc .mmc__cnc--off {
  writing-mode: vertical-rl;
}
.mmc__sync-warn,
.machine-tile__sync-warn {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.25;
  font-style: normal;
  color: #b45309;
}
.mmc__sync-warn--critical,
.machine-tile__sync-warn.mmc__sync-warn--critical {
  color: #b91c1c;
}
.mmc__sync-warn[hidden],
.machine-tile__sync-warn[hidden] {
  display: none !important;
}
.mmc__incident {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-style: normal;
  color: #b91c1c;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  background: #fef2f2;
}
@media (max-width: 1280px) {
  .mon-page .mon-machine--row,
  .mon-page .mon-machine--compact,
  .mon-page .mon-machine--row.is-nocnc {
    grid-template-columns: 88px minmax(160px, 1fr) minmax(240px, 1fr);
    grid-template-areas:
      "photo id stats"
      "cnc cnc side";
    min-height: 0;
  }
  .mmc__photo,
  .machine-photo--mmc { min-height: 96px; }
  .mmc__stats { padding: 8px 12px 8px 4px; }
  .mmc__cnc { margin: 0 10px 10px; }
  .mmc__cnc--off {
    writing-mode: horizontal-tb;
    transform: none;
    min-height: 40px;
  }
  .mmc__side { padding: 0 12px 12px 10px; }
}
@media (max-width: 720px) {
  .mon-page .mon-machine--row,
  .mon-page .mon-machine--compact,
  .mon-page .mon-machine--row.is-nocnc {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "id"
      "stats"
      "cnc"
      "side";
  }
  .mmc__photo { min-height: 120px; max-height: 140px; }
  .machine-photo--mmc { min-height: 120px; max-height: 140px; }
  .mmc__stats { flex-wrap: wrap; padding: 0 12px 12px; }
  .mmc__id { padding: 10px 12px 6px; }
  .mon-page .mon-section__head--board .mon-section__head-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* legacy wide board (unused) */
.mon-page .mon-section__head--board {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.mon-page .mon-section__head--board .mon-section__head-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
/* legacy wide board (unused) */
.mon-board--wide {
  padding: 0;
  width: 100%;
}
.mon-board--wide .mon-workshop {
  padding: 16px 18px 18px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.mon-board--wide .mon-workshop:last-child { margin-bottom: 0; }
.mon-board--wide .mon-workshop h3 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.mon-board--wide .mon-machine-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mon-page .mon-section__head--board {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.mon-page .mon-section__head--board .mon-section__head-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
}
.mon-page .mon-machine--wide {
  display: block;
  padding: 0;
  min-height: 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.mon-page .mon-machine--wide.mon-machine--working::before { display: none; }
.mon-page .mon-machine--wide:hover {
  transform: none;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .08);
}
.mon-machine__shell {
  display: grid;
  grid-template-columns: 104px minmax(220px, 0.9fr) minmax(300px, 1.1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "photo main cnc"
    "foot foot cnc";
  align-items: start;
  min-width: 0;
}
.mon-page .mon-machine--wide .mon-machine__photo {
  grid-area: photo;
  margin: 14px 0 0 14px;
  width: auto;
  height: 88px;
  min-height: 0;
  align-self: start;
  border-radius: 11px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  background: #0f172a;
}
.mon-page .mon-machine--wide .machine-photo--mon {
  width: 100%;
  height: 88px;
  min-height: 0;
  object-fit: cover;
  display: block;
}
.mon-machine__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #134e4a 0%, #0f172a 100%);
  color: #99f6e4;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.mon-machine__main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px 10px;
}
.mon-machine__foot {
  grid-area: foot;
  display: grid;
  gap: 6px;
  padding: 0 16px 14px 14px;
  min-width: 0;
}
.mon-machine--wide .mon-machine__top {
  margin-bottom: 0;
  align-items: flex-start;
  gap: 10px;
}
.mon-machine__identity {
  min-width: 0;
}
.mon-machine--wide .mon-machine__top b {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}
.mon-machine__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
  flex: 0 0 auto;
}
.mon-machine--free .mon-machine__badge { background: #dcfce7; color: #15803d; }
.mon-machine--working .mon-machine__badge,
.mon-machine--progress .mon-machine__badge { background: #e0f2fe; color: #0369a1; }
.mon-machine--setup .mon-machine__badge { background: #fef3c7; color: #b45309; }
.mon-machine--incident .mon-machine__badge { background: #fee2e2; color: #b91c1c; }
.mon-machine--idle .mon-machine__badge { background: #f1f5f9; color: #64748b; }
.mon-machine__inv,
.mon-machine__loc {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.mon-machine--wide .mon-machine__pass {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}
.mon-machine__prod {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.mon-machine__stat {
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.mon-machine__stat small {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mon-machine__stat b {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  letter-spacing: -.03em;
  color: #0f172a;
}
.mon-machine--wide .mon-machine__load {
  margin-top: 0;
  padding-top: 0;
  font-size: 11px;
}
.mon-machine--wide .mon-machine__progress {
  margin-top: 0;
}
.mon-machine--wide .mon-machine__incident {
  margin-top: 4px;
}
.mon-machine--wide .mon-machine__cnc {
  grid-area: cnc;
  margin: 0;
  padding: 14px 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  align-self: stretch;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-radius: 0;
  background: #fafbfc;
}
.mon-machine--wide .mon-machine__cnc.is-online {
  background: linear-gradient(180deg, #f0fdf4 0%, #fafbfc 100%);
}
.mon-machine--wide .mon-machine__cnc.is-offline {
  background: linear-gradient(180deg, #fef2f2 0%, #fafbfc 100%);
}
.mon-machine--wide .mon-machine__cnc.is-stale {
  background: linear-gradient(180deg, #fffbeb 0%, #fafbfc 100%);
}
.mon-machine__cnc-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.mon-machine__cnc-status {
  min-width: 0;
}
.mon-machine__cnc-ctrl {
  font-size: 10px;
  color: #64748b;
  text-align: right;
  line-height: 1.35;
  max-width: 46%;
}
.mon-machine__cnc-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mon-machine__cnc-mode .cnc-panel__pill {
  font-size: 11px;
  padding: 3px 9px;
}
.mon-machine__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.mon-machine__metric {
  padding: 6px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}
.mon-machine__metric small {
  display: block;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.mon-machine__metric b {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 750;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mon-machine__cnc-alarm {
  display: block;
  color: #b91c1c;
  font-style: normal;
  font-weight: 650;
  font-size: 11px;
}
.mon-machine__cnc-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
  min-width: 0;
}
.mon-machine__today h4,
.mon-machine__hist h4 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
}
.mon-machine__today h4 small {
  margin-left: 4px;
  color: #94a3b8;
  font-weight: 500;
}
.mon-machine__bars {
  display: grid;
  gap: 4px;
}
.mon-machine__bars .cnc-panel__bar {
  grid-template-columns: 72px 1fr 58px;
  gap: 6px;
  margin-bottom: 0;
  font-size: 10px;
}
.mon-machine__bars .cnc-panel__bar i {
  height: 6px;
}
.mon-machine__hist ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 108px;
  overflow: auto;
}
.mon-machine__hist li {
  padding: 3px 0;
  border-bottom: 1px solid #eef2f6;
  font-size: 10px;
  color: #334155;
  line-height: 1.35;
}
.mon-machine__hist time {
  color: #64748b;
  margin-right: 4px;
}
.mon-machine__cnc--off {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f8fafc;
  border-style: dashed;
  color: #64748b;
}
.mon-machine__cnc--off strong {
  font-size: 13px;
  color: #334155;
}
.mon-machine__cnc--off p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.45;
}
@media (max-width: 1180px) {
  .mon-machine__shell {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
      "photo main"
      "foot foot"
      "cnc cnc";
  }
  .mon-page .mon-machine--wide .mon-machine__cnc {
    border-left: none;
    border-top: 1px solid #e2e8f0;
    margin: 0;
    padding: 12px 14px 14px;
  }
  .mon-page .mon-machine--wide .mon-machine__photo,
  .mon-page .mon-machine--wide .machine-photo--mon {
    height: 80px;
  }
}
@media (max-width: 720px) {
  .mon-machine__shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "main"
      "foot"
      "cnc";
  }
  .mon-page .mon-machine--wide .mon-machine__photo {
    margin: 12px 12px 0;
    height: 140px;
    max-height: 160px;
  }
  .mon-page .mon-machine--wide .machine-photo--mon {
    height: 140px;
    max-height: 160px;
  }
  .mon-machine__main,
  .mon-machine__foot {
    padding-left: 14px;
    padding-right: 14px;
  }
  .mon-machine__metrics,
  .mon-machine__prod,
  .mon-machine__cnc-lower {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mon-page .mon-section__head--board .mon-section__head-controls {
    flex-direction: column;
    align-items: stretch;
  }
}
.home-machine-card__face {
  position: relative;
  width: 92px;
  flex: 0 0 auto;
}
.home-machine-card__photo {
  width: 92px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: #e8eef0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.machine-photo--home {
  width: 92px;
  height: 68px;
}
.home-machine-card__face .rcm-card__id {
  margin-top: 6px;
}
.ent-mcard__photo {
  height: 128px;
  overflow: hidden;
  background: #e8eef0;
}
.machine-photo--banner {
  width: 100%;
  height: 128px;
}
.machine-photo--thumb {
  width: 48px;
  height: 36px;
  border-radius: 8px;
  flex: 0 0 auto;
  object-fit: cover;
}
.machine-photo--map {
  width: 28px;
  height: 22px;
  border-radius: 5px;
  flex: 0 0 auto;
  object-fit: cover;
}
.machine-photo--pin {
  width: 100%;
  height: 168px;
  border-radius: 16px;
  object-fit: cover;
}
.tablet-pin__photo {
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 16px;
  background: #e8eef0;
}
.pin-station-links__row .machine-photo--thumb {
  align-self: center;
}
.launch-suggest {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}
.launch-suggest__meta {
  margin: 0;
  color: #475569;
  font-size: 12px;
}
.launch-suggest__list {
  display: grid;
  gap: 8px;
}
.launch-suggest__card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 0 10px 0 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.launch-suggest__card:hover { border-color: #14b8a6; }
.launch-suggest__card.is-best { border-color: #0f766e; box-shadow: 0 0 0 1px #0f766e33; }
.launch-suggest__card.is-picked { border-color: #0f766e; background: #f0fdfa; }
.launch-suggest__card.is-blocked { opacity: .72; }
.launch-suggest__card b {
  display: block;
  font-size: 13px;
}
.launch-suggest__card small {
  display: block;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.machine-photo--suggest {
  width: 72px;
  height: 52px;
  object-fit: cover;
}
.launch-suggest__blocked {
  margin-top: 4px;
}
.launch-suggest__blocked summary {
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
}
.launch-suggest__blocked .launch-suggest__card {
  margin-top: 8px;
}
.machine-photo-field input[type="file"] {
  max-width: 100%;
}

/* ===== Модалки «Запуск установа» / «Перенос на другой станок» ===== */
.modal.modal--lm { width: min(96vw, 780px); }
.modal--lm .modal__header h2 { font-size: 19px; }
.modal--lm .lm-sub {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.4;
}
.modal--lm .lm-body {
  display: grid;
  gap: 18px;
  padding: 18px 22px 6px;
}
.lm-sec { display: grid; gap: 8px; min-width: 0; }
.lm-sec__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.lm-sec__title {
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.lm-sec__meta { color: #64748b; font-size: 12px; }
.lm-sec__meta b { color: #0f172a; font-weight: 700; }
.modal--lm .lm-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1.5px solid #dbe2ea;
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.modal--lm .lm-input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .15);
}
.modal--lm .lm-input[readonly] {
  border-style: dashed;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 800;
}
.lm-hint { color: #64748b; font-size: 12px; }

.lm-picker { display: grid; gap: 10px; min-width: 0; }
.lm-picker__list { display: grid; gap: 8px; min-width: 0; }
.lm-picker:not(.is-expanded) .lm-mcard.is-extra,
.lm-picker:not(.is-expanded) .lm-card.is-extra { display: none; }

.lm-pass {
  padding: 12px 14px 14px;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #f8fafc 0%, #fff 48px);
}
.lm-pass__title {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lm-pass__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px 12px;
}
.lm-pass__item {
  min-width: 0;
}
.lm-pass__item span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lm-pass__item b {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.3;
  word-break: break-word;
}

.lm-cards { display: grid; gap: 10px; min-width: 0; }
.lm-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 13px 15px;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lm-card:hover {
  border-color: #5eead4;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}
.lm-card:focus-visible { outline: 3px solid rgba(20, 184, 166, .35); outline-offset: 1px; }
.lm-card.is-picked {
  border-color: #0f766e;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .14);
}
.lm-card.is-hero {
  padding: 16px;
  border-color: #99f6e4;
  background:
    linear-gradient(180deg, #f0fdfa 0%, #fff 56px);
  box-shadow: 0 10px 28px rgba(15, 118, 110, .08);
}
.lm-card.is-hero.is-picked {
  border-color: #0f766e;
  background: #ecfdf5;
}
.lm-card.is-soft { background: #fffbeb; border-color: #fde68a; }
.lm-card.is-soft.is-picked { background: #fef3c7; border-color: #f59e0b; }
.lm-card.is-bad { opacity: .78; background: #f8fafc; }
.lm-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}
.lm-card__id {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
}
.lm-card__id em {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 18px;
  font-style: normal;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.lm-card.is-soft .lm-card__id em { color: #b45309; }
.lm-card.is-bad .lm-card__id em { color: #94a3b8; }
.lm-card__id b {
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}
.lm-card__marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.lm-mark {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lm-card.is-best .lm-mark,
.lm-card.is-hero .lm-mark { background: #0f766e; color: #fff; }
.lm-card.is-soft .lm-mark { background: #f59e0b; color: #1c1917; }
.lm-card.is-bad .lm-mark { background: #fee2e2; color: #991b1b; }
.lm-card__grip {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}
.lm-card__lead {
  margin: 0;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
.lm-card.is-hero .lm-card__lead { font-size: 14.5px; }
.lm-card__why {
  display: grid;
  gap: 7px;
  margin: 2px 0 0;
  padding: 10px 12px;
  list-style: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, .035);
}
.lm-card__why li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.lm-card__why span {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding-top: 2px;
}
.lm-card__why b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}
.lm-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lm-card__tags span {
  padding: 3px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
}
.lm-card.is-hero .lm-card__tags span { background: #ccfbf1; color: #115e59; }
.lm-card .lm-check {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
}
.lm-card.is-picked .lm-check {
  border-color: #0f766e;
  background: #0f766e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.lm-picker__more {
  justify-self: start;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f766e;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.lm-picker__more:hover { background: #e2f7f4; }
.lm-picker__loading,
.lm-picker__empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}
.lm-spin {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid #99f6e4;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: lmSpin .8s linear infinite;
}
@keyframes lmSpin { to { transform: rotate(360deg); } }
.lm-picker__blocked { margin-top: 2px; }
.lm-picker__blocked summary,
.lm-manual summary {
  width: fit-content;
  cursor: pointer;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
}
.lm-picker__blocked summary:hover,
.lm-manual summary:hover { color: #0f766e; }
.lm-picker__blocked[open] summary { margin-bottom: 8px; }
.lm-manual { margin-top: 2px; }
.lm-manual[open] summary { margin-bottom: 8px; }

.lm-mcard {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 10px 14px 10px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lm-mcard:hover { border-color: #5eead4; box-shadow: 0 6px 18px rgba(15, 23, 42, .07); }
.lm-mcard:focus-visible { outline: 3px solid rgba(20, 184, 166, .35); outline-offset: 1px; }
.lm-mcard.is-picked {
  border-color: #0f766e;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .14);
}
.lm-mcard.is-blocked { background: #fcfcfd; }
.lm-mcard.is-blocked .lm-mcard__visual { filter: grayscale(1); opacity: .7; }
.lm-mcard__visual {
  position: relative;
  width: 76px;
  height: 58px;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}
.lm-mcard__photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.lm-mcard__nophoto { display: block; width: 100%; height: 100%; }
.lm-mcard__badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}
.lm-mcard__nophoto + .lm-mcard__badge {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #0f766e;
  font-size: 18px;
}
.lm-mcard__body { display: grid; gap: 4px; min-width: 0; }
.lm-mcard__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lm-mcard__name {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lm-mcard__tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lm-mcard__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.lm-mcard__cap { color: #64748b; font-size: 11.5px; line-height: 1.35; }
.lm-mcard__why { color: #475569; font-size: 11.5px; line-height: 1.35; }
.lm-picker__legend {
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}
.lm-mcard__whybox {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: left;
  white-space: normal;
}
.lm-mcard__whybox-title {
  display: block;
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: normal;
}
.lm-mcard__whybox-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}
.lm-mcard__whybox-item {
  display: block;
  width: 100%;
  font-size: 11.5px;
  line-height: 1.4;
  color: #475569;
  padding-left: 0.9em;
  position: relative;
  white-space: normal;
}
.lm-mcard__whybox-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: inherit;
}
.lm-mcard__whybox-item.is-con { color: #9a3412; }
.lm-mcard__whybox-item.is-pro { color: #166534; }
.lm-mcard__tag--soft {
  background: #ffedd5 !important;
  color: #9a3412 !important;
}
.lm-mcard.is-soft:not(.is-best) {
  border-color: #fdba74;
}
.lm-mcard__warn { color: #c2410c; font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.lm-mcard__warn::before { content: "⚠ "; }
.lm-mcard__check {
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  transition: all .15s;
}
.lm-mcard.is-picked .lm-mcard__check {
  border-color: #0f766e;
  background: #0f766e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.lm-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.lm-chip--free { background: #dcfce7; color: #166534; }
.lm-chip--queue { background: #fef3c7; color: #92400e; }
.lm-chip--bad { background: #fee2e2; color: #b91c1c; }

.lm-move {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.lm-move__side {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.lm-move__side small {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.lm-move__side b {
  overflow: hidden;
  color: #0f172a;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lm-move__side--to b { color: #94a3b8; font-weight: 600; }
.lm-move__side--to.is-set { border-color: #5eead4; background: #f0fdfa; }
.lm-move__side--to.is-set b { color: #0f766e; font-weight: 800; }
.lm-move__arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f766e;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.modal--lm .lm-foot {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line, #e5e7eb);
  background: rgba(255, 255, 255, .97);
}
.lm-summary {
  flex: 1 1 200px;
  min-width: 0;
  overflow: hidden;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lm-summary.is-set { color: #334155; }
.lm-summary.is-set b { color: #0f766e; }
.lm-foot__actions { display: flex; gap: 8px; margin-left: auto; }

@media (max-width: 720px) {
  .lm-card__why li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) {
  .modal--lm .lm-body { padding: 14px 14px 6px; }
  .modal--lm .lm-foot { padding: 12px 14px; }
  .lm-mcard { grid-template-columns: 60px minmax(0, 1fr) 22px; gap: 10px; }
  .lm-mcard__visual { width: 60px; height: 48px; }
  .lm-move { grid-template-columns: 1fr; }
  .lm-move__arrow { transform: rotate(90deg); justify-self: center; }
  .lm-foot__actions { width: 100%; }
  .lm-foot__actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lm-mcard { transition: none; }
  .lm-spin { animation: none; }
}

/* ===== Monitoring floor cards v23 (look of shift-rc card, monitoring data) ===== */
.mon-page--cmd > #mon-alerts { order: 4; }
.mon-page--cmd > #mon-production { order: 5; }
.mon-page--cmd > #mon-tops { order: 6; }
.mon-page--cmd > #mon-oee-live { order: 7; }
.mon-page--cmd > #mon-people { order: 8; }
.mon-page--cmd > #mon-floor { order: 9; }
.mon-page--cmd > #mon-events { order: 10; }
.mon-tops-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mon-tops-list { display: grid; gap: 6px; padding: 10px 12px 12px; }
.mon-top-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1.1fr) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #eef2f6;
  border-radius: 11px;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mon-top-row:hover { border-color: #bfd9e5; box-shadow: 0 4px 14px rgba(15, 23, 42, .07); transform: translateY(-1px); }
.mon-top-row__dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.mon-top-row__dot--progress, .mon-top-row__dot--working { background: #2563eb; color: #2563eb; }
.mon-top-row__dot--setup { background: #d97706; color: #d97706; }
.mon-top-row__dot--idle { background: #64748b; color: #64748b; }
.mon-top-row__dot--incident { background: #dc2626; color: #dc2626; }
.mon-top-row__dot--free { background: #94a3b8; color: #94a3b8; }
.mon-top-row__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0f172a; font-size: 12px; font-weight: 650; }
.mon-top-row__bar { position: relative; height: 8px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.mon-top-row__bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #0ea5e9, #2563eb); }
.mon-top-row__bar em { position: absolute; inset: 0 auto 0 0; border-radius: inherit; border-right: 2px dashed #94a3b8; background: transparent; }
.mon-top-row__val { display: inline-flex; align-items: baseline; gap: 2px; color: #0f172a; font-variant-numeric: tabular-nums; }
.mon-top-row__val b { font-size: 14px; }
.mon-top-row__val small { color: #94a3b8; font-size: 10px; }
.mon-tops-empty { padding: 16px; text-align: center; }
@media (max-width: 1080px) {
  .mon-tops-grid { grid-template-columns: 1fr; }
}
.mon-hero-period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.mon-period-presets { display: inline-flex; gap: 3px; padding: 3px; border-radius: 9px; background: #f1f5f9; }
.mon-period-presets button,
.mon-period-range button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.mon-period-presets button.is-active { background: #0f766e; color: #fff; box-shadow: 0 2px 8px rgba(15,118,110,.2); }
.mon-period-range { display: flex; align-items: center; gap: 5px; }
.mon-period-range input { height: 30px; padding: 0 7px; border: 1px solid #cbd5e1; border-radius: 7px; color: #0f172a; font-size: 11px; }
.mon-period-range button { background: #e2e8f0; color: #0f172a; }
.mon-period-current { color: #64748b; font-size: 11px; font-weight: 650; white-space: nowrap; }
.mon-page--cmd > .mon-subnav { order: 2; }
.mon-page--cmd > #mon-overview { order: 3; }
.mon-page--cmd > #mon-alerts { order: 4; }
.mon-exceptions {
  overflow: hidden;
  padding: 18px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: linear-gradient(145deg,#fff 0%,#fff7f7 100%);
  box-shadow: 0 12px 32px rgba(127,29,29,.07);
}
.mon-exceptions__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mon-exceptions__eyebrow { display: block; margin-bottom: 4px; color: #b91c1c; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mon-exceptions__head h2 { margin: 0; color: #450a0a; font-size: 22px; }
.mon-exceptions__head p { margin: 4px 0 0; color: #7f1d1d; font-size: 12px; }
.mon-exceptions__summary { display: flex; flex-wrap: wrap; gap: 7px; }
.mon-exceptions__summary span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 11px; }
.mon-exceptions__summary span.is-critical { background: #fee2e2; color: #991b1b; }
.mon-exceptions__summary span.is-high { background: #ffedd5; color: #9a3412; }
.mon-exceptions__subhead { margin-top: 18px; padding-top: 16px; border-top: 1px solid #fecaca; }
.mon-exceptions__subhead h3 { margin: 0; color: #450a0a; font-size: 14px; }
.mon-exceptions__subhead p { margin: 3px 0 0; color: #7f1d1d; font-size: 11px; }
.mon-oee-live-grid { display: grid; grid-template-columns: minmax(300px,.75fr) minmax(0,1.25fr); gap: 10px; }
.mon-oee-live-score__body {
  display: grid;
  grid-template-columns: minmax(170px,.8fr) 1.2fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
}
.mon-oee-live-score__donut { position: relative; height: 190px; }
.mon-oee-live-score__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.mon-oee-live-score__center strong { font-size: 28px; color: #0f172a; line-height: 1.1; }
.mon-oee-live-score__center span { color: #64748b; font-size: 11px; }
.mon-oee-live-score__stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 8px; }
.mon-oee-live-score__stat {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #e8eef2;
  border-radius: 10px;
  background: #f8fafc;
}
.mon-oee-live-score__stat small { color: #64748b; font-size: 10px; font-weight: 650; }
.mon-oee-live-score__stat b { color: #0f172a; font-size: 19px; line-height: 1; font-variant-numeric: tabular-nums; }
.mon-people-list { display: grid; gap: 7px; padding: 10px 12px 12px; }
.mon-person {
  display: grid;
  grid-template-columns: 24px 36px minmax(150px,1fr) minmax(120px,.75fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #edf1f5;
  border-radius: 12px;
  background: #fff;
}
.mon-person__rank { color: #94a3b8; font-size: 11px; font-weight: 750; text-align: center; }
.mon-person__avatar { display: grid; place-content: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg,#ccfbf1,#dbeafe); color: #0f766e; font-size: 14px; font-weight: 800; }
.mon-person__info { display: grid; gap: 3px; min-width: 0; }
.mon-person__info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0f172a; font-size: 12px; }
.mon-person__info span { color: #64748b; font-size: 10px; }
.mon-person__info em { color: #b91c1c; font-style: normal; }
.mon-person__ktu { position: relative; height: 28px; overflow: hidden; border-radius: 8px; background: #f1f5f9; }
.mon-person__ktu i { position: absolute; inset: 0 auto 0 0; max-width: 100%; border-radius: inherit; background: linear-gradient(90deg,#99f6e4,#5eead4); }
.mon-person__ktu b { position: relative; z-index: 1; display: grid; place-content: center; height: 100%; color: #0f172a; font-size: 12px; font-variant-numeric: tabular-nums; }
.mon-people-empty { padding: 30px 16px; color: #64748b; text-align: center; font-size: 12px; }
@media (max-width: 720px) {
  .mon-person { grid-template-columns: 22px 34px minmax(0,1fr); }
  .mon-person__ktu { grid-column: 2 / -1; }
}
@media (max-width: 980px) {
  .mon-oee-live-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .mon-exceptions__head { flex-direction: column; }
  .mon-oee-live-score__body { grid-template-columns: 1fr; }
}
.mon-page .mf-board { padding: 0; width: 100%; }
.mon-page .mf-shop {
  padding: 12px !important;
  margin: 0 0 10px !important;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}
.mon-page .mf-shop:last-child { margin-bottom: 0 !important; }
.mon-page .mf-shop h3 {
  margin: 0 0 10px !important;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.mon-page .mf-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}
.mon-page .mf-card.mon-machine {
  --mf-accent: #94a3b8;
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  transform: none !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: none !important;
  opacity: 1;
}
.mon-page .mf-card.mon-machine::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--mf-accent);
  opacity: .85;
  z-index: 1;
}
.mon-page .mf-card--free { --mf-accent: #94a3b8; }
.mon-page .mf-card--idle { --mf-accent: #64748b; }
.mon-page .mf-card--setup { --mf-accent: #d97706; }
.mon-page .mf-card--progress { --mf-accent: #1f6f8b; }
.mon-page .mf-card--incident { --mf-accent: #dc2626; }
.mon-page .mf-card--inactive { --mf-accent: #94a3b8; opacity: .72; }
.mon-page .mf-card.mon-machine:hover {
  transform: none !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08) !important;
}
.mon-page .mf-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 16px 8px 18px;
}
.mon-page .mf-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  box-sizing: border-box;
  white-space: nowrap;
  line-height: 1;
}
.mon-page .mf-analytics {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  flex: 0 0 auto;
}
.mon-page .mf-analytics:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.mon-page .mf-analytics svg { display: block; width: 18px; height: 18px; }
.mon-page .mf-id > span {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
  line-height: 1;
}
.mon-page .mf-id strong {
  font-size: 16px;
  letter-spacing: -.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #fff;
}
.mon-page .mf-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.mon-page .mf-title-row h3 {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: #0f172a;
}
.mon-page .mf-title-row .rc-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .01em;
  text-transform: none;
  border: 1px solid transparent;
}
.mon-page .mf-title-row .rc-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.mon-page .mf-card--setup .rc-status--setup {
  color: #92400e;
  background: #fff7ed;
  border-color: #fed7aa;
}
.mon-page .mf-card--idle .rc-status--idle {
  color: #334155;
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.mon-page .mf-card--progress .rc-status--progress {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}
.mon-page .mf-card--incident .rc-status--incident {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}
.mon-page .mf-card--free .rc-status--free,
.mon-page .mf-card--inactive .rc-status--inactive {
  color: #475569;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.mon-page .mf-title small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}
.mon-page .mf-incident {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  color: #b91c1c;
  font-weight: 650;
}
.mon-page .mf-idle-reason {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  color: #57534e;
  font-weight: 650;
}
.mon-page .mf-cells {
  display: block !important;
  width: 100% !important;
  padding: 0 14px 4px !important;
  box-sizing: border-box !important;
}
.mon-page .mf-cells__row,
.mon-page .mf-cells .rcm-info {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}
.mon-page .mf-cell,
.mon-page .mf-card .rcm-cell {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  min-height: 64px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(15, 23, 42, .07) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
  box-sizing: border-box !important;
  text-align: center !important;
}
.mon-page .mf-cell > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  width: 100%;
}
.mon-page .mf-cell > b {
  display: block;
  width: 100%;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mon-page .mf-cell > em {
  display: block;
  width: 100%;
  font-size: 10px;
  font-style: normal;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mon-page .mf-cell--made b { color: #1d4ed8; }
.mon-page .mf-cnc.mon-machine__cnc {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)) !important;
  grid-template-areas: none !important;
  gap: 6px !important;
  margin: 8px 14px 8px !important;
  padding: 8px !important;
  min-width: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  cursor: default !important;
  overflow: hidden !important;
  justify-content: stretch !important;
  align-content: start !important;
}
.mon-page .mf-cnc.is-online {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}
.mon-page .mf-cnc.is-stale {
  background: #fffbeb !important;
  border-color: #fde68a !important;
}
.mon-page .mf-cnc.is-offline {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
}
.mon-page .mf-cnc .mf-cell {
  background: rgba(255, 255, 255, .78);
  min-height: 52px;
  padding: 6px 8px;
}
.mon-page .mf-cnc .mf-cell > span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mon-page .mf-cnc .mf-cell--cycle > em {
  color: #166534;
  font-weight: 650;
}
.mon-page .mf-cnc .mf-cell--cycle > em[hidden] {
  display: none !important;
}
.mon-page .mf-cnc .mf-cell > b {
  margin: 2px 0 0;
  font-size: 12px;
}
.mon-page .mf-alarm {
  grid-column: 1 / -1;
  display: block;
  font-size: 11px;
  font-style: normal;
  color: #b91c1c;
  font-weight: 700;
}
.mon-page .mf-cnc .mmc__sync-warn {
  grid-column: 1 / -1;
  margin: 0;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  background: #fffbeb;
}
.mon-page .mf-gantt {
  padding: 0 14px 12px;
  min-width: 0;
}
.mon-page .mf-gantt .rcm-gantt {
  margin: 0;
}
@media (max-width: 1400px) {
  .mon-page .mf-cells__row,
  .mon-page .mf-cells .rcm-info {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 980px) {
  .mon-page--cmd .mon-kpi-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .mon-page .mf-cells__row,
  .mon-page .mf-cells .rcm-info {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 720px) {
  .mon-page--cmd .mon-kpi-v2 { grid-template-columns: 1fr 1fr !important; }
}

/* ???????????????????? ?? ?????????????????????? */
.mon-page--cmd>.mon-subnav{order:2}
.mon-page--cmd>#mon-overview{order:3}
.mon-page--cmd>#mon-alerts{order:4}
.mon-page--cmd>#mon-production{order:5}
.mon-page--cmd>#mon-tops{order:6}
.mon-page--cmd>#mon-oee-live{order:7}
.mon-page--cmd>#mon-people{order:8}
.mon-page--cmd>#mon-floor{order:9}
.mon-page--cmd>#mon-events{order:10}
.mon-alerts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-top:12px}
.mon-alert-card{border:1px solid #e2e8f0;border-radius:14px;padding:14px 16px;background:#fff;border-left:5px solid #94a3b8;min-height:110px;display:flex;flex-direction:column;gap:6px}
.mon-alert-card--critical{border-left-color:#dc2626;background:linear-gradient(180deg,#fef2f2,#fff)}
.mon-alert-card--high{border-left-color:#ea580c;background:linear-gradient(180deg,#fff7ed,#fff)}
.mon-alert-card--medium{border-left-color:#ca8a04;background:linear-gradient(180deg,#fefce8,#fff)}
.mon-alert-card__tone{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#64748b}
.mon-alert-card h3{margin:0;font-size:15px;line-height:1.25;color:#0f172a}
.mon-alert-card p{margin:0;font-size:13px;color:#475569;flex:1}
.mon-alert-card a{font-size:13px;font-weight:700;color:#0a6b6b;text-decoration:none}
.mon-alert-empty{padding:20px;border:1px dashed #cbd5e1;border-radius:14px;text-align:center;color:#64748b;background:#f8fafc}
.mon-alerts-grid>.mon-alert-empty{grid-column:1/-1}
.mon-shift-cmp{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-top:12px}
.mon-shift-cmp__card{border:1px solid #d8e2ea;border-radius:14px;padding:14px 16px;background:#f8fbfb}
.mon-shift-cmp__card strong{display:block;font-size:13px;color:#0a6b6b;margin-bottom:8px}
.mon-shift-cmp__card b{font-size:22px;color:#0f1a24}
.mon-shift-cmp__delta{margin-top:12px;padding:12px 14px;border-radius:12px;background:#0a6b6b;color:#ecfeff;font-size:13px;font-weight:650}

.mon-page--cmd>#mon-floor{order:4}
.mon-page--cmd>#mon-production{order:5}
.mon-page--cmd>#mon-quality{order:6}
.mon-page--cmd>#mon-loss-analysis{order:7}
.mon-page--cmd>#mon-alerts{order:8}
.mon-page--cmd>#mon-system{order:9}
.mon-page--cmd>#mon-tops{order:10}
.mon-page--cmd>#mon-oee-live{order:11}
.mon-page--cmd>#mon-people{order:12}
.mon-page--cmd>#mon-events{order:13}
.mon-analytics-section{display:grid;gap:10px}
.mon-stat-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px}
.mon-stat-strip>span{display:grid;gap:5px;min-height:68px;padding:11px 13px;border:1px solid #e2e8f0;border-radius:12px;background:linear-gradient(145deg,#fff,#f8fafc);box-shadow:0 1px 2px rgba(15,23,42,.04)}
.mon-stat-strip small{color:#64748b;font-size:10px;font-weight:700;letter-spacing:.025em;text-transform:uppercase}
.mon-stat-strip b{color:#0f172a;font-size:21px;line-height:1;font-variant-numeric:tabular-nums}
.mon-panel--wide{grid-column:1/-1}
.mon-page--cmd .mon-chart-wrap--lg{height:260px}
.mon-analytics-section .panel{overflow:hidden}
.mon-analytics-section canvas{transition:opacity .2s ease}
@media(max-width:980px){.mon-panel--wide{grid-column:auto}.mon-page--cmd .mon-chart-wrap--lg{height:230px}}
@media(max-width:620px){.mon-stat-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.mon-stat-strip>span{min-height:62px;padding:10px}.mon-stat-strip b{font-size:18px}}
@media(prefers-reduced-motion:reduce){.mon-analytics-section canvas{transition:none}}


/* ===== MK ledger: compact production registry ===== */
.page-heading--compact { margin-bottom: 10px; }
.page-heading--compact h1 { margin-bottom: 2px; font-size: clamp(22px, 2.4vw, 28px); }
.page-heading--compact p { margin: 0; font-size: 13px; color: var(--muted); max-width: 52rem; }
.page-heading--compact .eyebrow { margin-bottom: 4px; }

.mk-ledger,
.mk-ledger-wrap { display: grid; gap: 10px; }
.mk-ledger__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.mk-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef2f5;
}
.mk-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}
.mk-tabs a b {
  min-width: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.mk-tabs a.is-on {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.mk-tabs a.is-on b { background: var(--accent-soft); color: var(--accent-dark); }
.mk-ledger__tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mk-ledger__tools input[type="search"] {
  width: min(220px, 58vw);
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.mk-ledger__tools input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(26,168,150,.16);
}
.mk-ledger__tools span {
  min-width: 1.5rem;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mk-ledger__panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.mk-ledger__head,
.mk-ledger__row {
  display: grid;
  align-items: center;
  column-gap: 8px;
  padding: 6px 10px 6px 8px;
}
.mk-ledger__head--qc,
.mk-ledger__row--qc {
  grid-template-columns: minmax(0, 1.5fr) 88px 52px 52px 64px 52px 52px 96px 108px;
}
.mk-ledger__head--hist,
.mk-ledger__row--hist {
  grid-template-columns: minmax(0, 1.35fr) 88px 52px 52px 52px 52px 52px minmax(88px, .85fr) 96px 96px;
}
.mk-ledger__head--arch,
.mk-ledger__row--arch {
  grid-template-columns: minmax(0, 1.5fr) 52px 52px 52px 52px 52px minmax(96px, .85fr) 96px 128px;
}
.mk-ledger__head {
  min-height: 30px;
  border-bottom: 1px solid var(--line-soft);
  background: #f7f9fb;
  color: #7a8591;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mk-ledger__head > span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}
.mk-ledger__head > span:first-child {
  justify-content: flex-start;
  text-align: left;
}
.mk-ledger__body { display: grid; }
.mk-ledger__row {
  min-height: 44px;
  border-bottom: 1px solid #eef2f5;
  background: #fff;
}
.mk-ledger__row:last-child { border-bottom: 0; }
.mk-ledger__row:hover { background: #f8fbfb; }
.mk-ledger__pos {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  align-self: center;
  min-width: 0;
  text-align: left;
}
.mk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.18);
}
.mk-ledger__row.is-wait .mk-dot { background: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.16); }
.mk-ledger__row.is-work .mk-dot { background: #3984e7; box-shadow: 0 0 0 3px rgba(57,132,231,.16); }
.mk-ledger__row.is-warn .mk-dot { background: #ea580c; box-shadow: 0 0 0 3px rgba(234,88,12,.16); }
.mk-ledger__row.is-done .mk-dot { background: #19a974; box-shadow: 0 0 0 3px rgba(25,169,116,.16); }
.mk-ledger__pos strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-ledger__pos small {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: #7b8694;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-ledger__pos small a { color: var(--accent-dark); font-weight: 700; }
.mk-ledger__status {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}
.mk-ledger__status span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2f5;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.mk-ledger__row.is-wait .mk-ledger__status span { background: #fff6df; color: #9a6b00; }
.mk-ledger__row.is-work .mk-ledger__status span { background: #e8f1fc; color: #1d4f91; }
.mk-ledger__row.is-warn .mk-ledger__status span { background: #fff1df; color: #9a5200; }
.mk-ledger__row.is-done .mk-ledger__status span { background: #e6f7ef; color: #0f7a4c; }
.mk-ledger__num,
.mk-ledger__who,
.mk-ledger__when {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-ledger__num { color: var(--text); }
.mk-ledger__num.is-ok { color: #0f7a4c; }
.mk-ledger__num.is-bad { color: #b42318; }
.mk-ledger__who,
.mk-ledger__when { color: #526071; font-weight: 650; }
.mk-ledger__act {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  gap: 4px;
}
.mk-ledger__act form { margin: 0; }
.mk-ledger__act a,
.mk-ledger__act button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
}
.mk-ledger__act a.is-primary,
.mk-ledger__act button.is-primary {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}
.mk-ledger__act a:hover,
.mk-ledger__act button:hover { border-color: #b7c2cc; background: #f8fafc; }
.mk-ledger__act a.is-primary:hover,
.mk-ledger__act button.is-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
  filter: brightness(1.08);
}
.mk-ledger__act button:not(.is-primary) {
  min-width: 26px;
  padding: 0;
  color: #94a3b8;
}
.mk-ledger__empty {
  padding: 28px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.mk-ledger__empty.is-filter { margin-top: 2px; }

@media (max-width: 1180px) {
  .mk-ledger__head--hist,
  .mk-ledger__row--hist,
  .mk-ledger__head--arch,
  .mk-ledger__row--arch,
  .mk-ledger__head--qc,
  .mk-ledger__row--qc {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
    padding: 8px 10px;
  }
  .mk-ledger__head { display: none; }
  .mk-ledger__pos { grid-column: 1 / -1; }
  .mk-ledger__status,
  .mk-ledger__num,
  .mk-ledger__who,
  .mk-ledger__when {
    justify-self: stretch;
    justify-content: center;
    text-align: center;
  }
  .mk-ledger__act {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 2px;
  }
}

/* ?? ????????? ? ?????????? (?????????? ???????) ?? */
.settings-panel > section[data-settings-panel="automation"] {
  padding: 18px 20px 22px;
  min-height: 0;
}
.section-title--compact {
  margin-bottom: 12px;
  padding-bottom: 8px;
}
.section-title--compact h2 {
  font-size: 18px;
  margin: 0 0 4px;
}
.section-title--compact p {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.35;
}
.ar-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.ar-bar__grace {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}
.ar-bar__grace input {
  width: 64px;
  padding: 4px 6px;
  font-size: 13px;
  border-radius: 6px;
}
.ar-bar__hint {
  font-size: 11.5px;
  color: #94a3b8;
}
.ar-wrap {
  display: grid;
  gap: 12px;
}
.ar-group {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.ar-group__head {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.ar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ar-table th {
  padding: 5px 8px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 650;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: #fafbfc;
  border-bottom: 1px solid #eef2f7;
}
.ar-table td {
  padding: 6px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.ar-table tr:last-child td {
  border-bottom: 0;
}
.ar-table tr.is-off {
  opacity: .55;
}
.ar-col-on {
  width: 40px;
  text-align: center;
}
.ar-col-on input {
  width: 15px;
  height: 15px;
  margin: 0;
}
.ar-col-title {
  width: 28%;
  min-width: 140px;
}
.ar-title {
  font-weight: 650;
  color: #0f172a;
  cursor: help;
  line-height: 1.25;
}
.ar-col-params {
  min-width: 0;
}
.ar-params {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.ar-param {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}
.ar-param span {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ar-param input[type="number"] {
  width: 58px;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #dbe3ee;
  background: #fff;
}
.ar-param select {
  min-width: 110px;
  max-width: 180px;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #dbe3ee;
  background: #fff;
}
.ar-bar__grace select {
  min-width: 96px;
  padding: 4px 6px;
  font-size: 13px;
  border-radius: 6px;
}

/* —— Производство: KPI + базовые поля —— */
.prod-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.prod-kpi {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  min-width: 0;
}
.prod-kpi__label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}
.prod-kpi select,
.prod-field select {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}
.prod-kpi__control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
}
.prod-kpi__control input {
  width: 72px;
  border: 0;
  padding: 6px 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.02em;
  color: #0f172a;
  background: transparent;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.prod-kpi__control em {
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  color: #94a3b8;
  text-transform: lowercase;
}
.prod-kpi small,
.prod-field small {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
}
.prod-basics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.prod-field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border-right: 1px solid #eef2f7;
  min-width: 0;
}
.prod-field:last-child {
  border-right: 0;
}
.prod-field__label {
  font-size: 12.5px;
  font-weight: 650;
  color: #0f172a;
}
.prod-footnote {
  margin: 12px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}
.prod-footnote a {
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
}
.prod-footnote a:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  .prod-kpis,
  .prod-basics__grid {
    grid-template-columns: 1fr;
  }
  .prod-field {
    border-right: 0;
    border-bottom: 1px solid #eef2f7;
  }
  .prod-field:last-child {
    border-bottom: 0;
  }
}

/* —— Настройки → Логи —— */
.settings-logs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.settings-logs-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}
.settings-logs-nav a:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}
.settings-logs-nav a.is-active {
  border-color: #0f766e;
  background: #f0fdfa;
  color: #0f766e;
}
.settings-logs-block .table-scroll {
  margin-top: 4px;
}
.settings-logs-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}
.settings-logs-pager__meta {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.settings-logs-pager__size {
  display: inline-flex;
  gap: 4px;
}
.settings-logs-pager__size a {
  min-width: 36px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.settings-logs-pager__size a.is-active {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.settings-logs-pager__pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.settings-logs-pager__pages a,
.settings-logs-pager__pages span {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.settings-logs-pager__pages a {
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.settings-logs-pager__pages a:hover {
  background: #fff;
  border-color: #94a3b8;
}
.settings-logs-pager__pages .is-current {
  color: #fff;
  background: #0f766e;
  border: 1px solid #0f766e;
}
.settings-logs-pager__pages .is-disabled,
.settings-logs-pager__pages .is-gap {
  color: #cbd5e1;
  border: 0;
  background: transparent;
}

.ar-param--bool {
  gap: 5px;
}
.ar-param--bool input {
  margin: 0;
}
.ar-empty {
  color: #cbd5e1;
}
.ar-col-act {
  width: 108px;
  white-space: nowrap;
}
.ar-col-act code {
  font-size: 10.5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}
@media (max-width: 900px) {
  .ar-table thead {
    display: none;
  }
  .ar-table,
  .ar-table tbody,
  .ar-table tr,
  .ar-table td {
    display: block;
    width: 100%;
  }
  .ar-table tr {
    padding: 8px 10px;
    border-bottom: 1px solid #eef2f7;
  }
  .ar-col-on {
    float: left;
    width: auto;
    padding-right: 8px;
    padding-top: 2px;
  }
  .ar-col-title {
    width: auto;
    padding-left: 28px;
  }
  .ar-col-params,
  .ar-col-act {
    padding-left: 28px;
    margin-top: 4px;
  }
  .ar-col-act {
    width: auto;
  }
}
/* —— Главная (home dash) —— */
.admin-content > .page-heading--home {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 14px;
}
.admin-content > .page-heading--home h1 {
  font-size: clamp(20px, 2.4vw, 26px);
  margin-bottom: 4px;
}
.admin-content > .page-heading--home p {
  font-size: 12.5px;
}
.admin-content > .page-heading--home .heading-actions {
  padding: 6px 8px;
  gap: 6px;
  border-radius: 10px;
}
.admin-content > .page-heading--home .heading-actions .button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.home-tips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.home-tip {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease, border-color .15s ease, box-shadow .15s ease;
  transition-delay: var(--home-delay, 0ms);
}
.home-tip.is-in {
  opacity: 1;
  transform: none;
}
a.home-tip:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}
.home-tip__mark {
  width: 6px;
  align-self: stretch;
  border-radius: 99px;
  background: #94a3b8;
}
.home-tip--focus .home-tip__mark { background: #0f766e; }
.home-tip--ok .home-tip__mark { background: #16a34a; }
.home-tip--warn .home-tip__mark,
.home-tip--amber .home-tip__mark { background: #d97706; }
.home-tip--alert .home-tip__mark { background: #dc2626; }
.home-tip--info .home-tip__mark { background: #2563eb; }
.home-tip__body b {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.home-tip__body p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: #0f172a;
  font-weight: 600;
}
.home-tip__go {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}

.home-workbench,
.home-lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.home-panel {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.home-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.home-panel__head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.home-panel__head span,
.home-panel__head a {
  font-size: 11px;
  font-weight: 650;
  color: #64748b;
  text-decoration: none;
}
.home-panel__head a:hover { color: #0f766e; }

.home-task-list {
  display: grid;
  padding: 4px 6px 8px;
}
.home-task {
  display: grid;
  gap: 2px;
  padding: 8px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.home-task:hover { background: #f8fafc; }
.home-task b {
  font-size: 12.5px;
  line-height: 1.25;
}
.home-task small {
  color: #64748b;
  font-size: 11px;
}
.home-empty {
  padding: 16px 12px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.home-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}
.home-check {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  transition-delay: var(--home-delay, 0ms);
}
.home-check.is-in { opacity: 1; transform: none; }
.home-check.is-hot {
  border-color: #fde68a;
  background: #fffbeb;
}
.home-check--critical.is-hot {
  border-color: #fecaca;
  background: #fef2f2;
}
.home-check strong {
  font-size: 18px;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.home-check span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.25;
}

.home-mini-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}
.home-mini-kpi {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  transition-delay: var(--home-delay, 0ms);
}
.home-mini-kpi.is-in { opacity: 1; transform: none; }
.home-mini-kpi small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.home-mini-kpi strong {
  font-size: 18px;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.home-mini-kpi em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}
.home-mini-kpi--alert strong { color: #dc2626; }
.home-mini-kpi--amber strong { color: #b45309; }
.home-mini-kpi--green strong { color: #15803d; }
.home-mini-kpi--violet strong { color: #7c3aed; }
.home-mini-kpi--blue strong { color: #2563eb; }

.home-pulse {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}
.home-pulse__kpis {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.home-pulse__card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
  transition-delay: var(--home-delay, 0ms);
}
.home-pulse__card.is-in { opacity: 1; transform: none; }
.home-pulse__card > small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.home-pulse__card > strong {
  font-size: 22px;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.home-pulse__card > strong i {
  font-style: normal;
  color: #cbd5e1;
  margin: 0 2px;
}
.home-pulse__card > em {
  font-style: normal;
  font-size: 11.5px;
  color: #64748b;
}
.home-pulse__card--oee {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.home-pulse__ring {
  --pct: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(#0f766e calc(var(--pct) * 1%), #e2e8f0 0);
  animation: homeRingIn .9s ease both;
}
.home-pulse__ring strong {
  font-size: 16px;
  letter-spacing: -.03em;
  line-height: 1;
}
.home-pulse__ring small {
  font-size: 9px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: .06em;
}
.home-pulse__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.home-pulse__meta b { font-size: 13px; }
.home-pulse__meta span,
.home-pulse__meta em {
  font-size: 11.5px;
  color: #64748b;
  font-style: normal;
}
.home-pulse__bar {
  height: 4px;
  margin-top: 4px;
  border-radius: 99px;
  background: #eef2f7;
  overflow: hidden;
}
.home-pulse__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #0f766e);
  transform-origin: left center;
  animation: homeBarIn .9s ease both;
}
.home-pulse__bar--teal i {
  background: linear-gradient(90deg, #14b8a6, #0f766e);
}
@keyframes homeRingIn {
  from { filter: saturate(.6); transform: scale(.92); }
  to { filter: none; transform: none; }
}
@keyframes homeBarIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.home-pulse__charts {
  padding-bottom: 8px;
}
.home-pulse__chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(200px, .7fr);
  gap: 12px;
  padding: 0 12px 12px;
}
.home-pulse__chart {
  position: relative;
  height: 200px;
}
.home-pulse__chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.home-fleet__block {
  padding: 0 12px 12px;
}
.home-fleet__block + .home-fleet__block {
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}
.home-fleet__block h3 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}
.home-fleet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}
.home-fleet__chip {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e8eef5;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.home-fleet__chip:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.home-fleet__chip b {
  font-size: 12px;
  color: #0f766e;
}
.home-fleet__chip span {
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-fleet__chip em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}
.home-fleet__chip--progress,
.home-fleet__chip--working { border-left: 3px solid #0f766e; }
.home-fleet__chip--setup { border-left: 3px solid #d97706; }
.home-fleet__chip--idle { border-left: 3px solid #94a3b8; }
.home-fleet__chip--free { border-left: 3px solid #22c55e; }
.home-fleet__chip--incident { border-left: 3px solid #dc2626; background: #fff7f7; }

.home-incidents { margin-bottom: 8px; }
.home-incident-list {
  display: grid;
  padding: 4px 8px 10px;
}
.home-incident {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.home-incident:hover { background: #f8fafc; }
.home-incident b {
  display: block;
  font-size: 12.5px;
}
.home-incident small {
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 1100px) {
  .home-tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-workbench,
  .home-lists { grid-template-columns: 1fr 1fr; }
  .home-pulse__kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .home-tips,
  .home-workbench,
  .home-lists,
  .home-pulse__kpis,
  .home-pulse__chart-grid {
    grid-template-columns: 1fr;
  }
  .home-pulse__chart { height: 180px; }
  .home-check-grid { grid-template-columns: 1fr 1fr; }
}

/* —— Главная: о системе —— */
.home-pulse--charts-only {
  margin-bottom: 18px;
}
.home-about {
  margin: 0 0 12px;
}
.home-about__intro {
  margin: 0 0 12px;
}
.home-about__intro h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.home-about__intro p {
  margin: 0;
  max-width: 68ch;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}
.home-about__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.home-about__card {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #f8fafc 0%, #fff 42%);
}
.home-about__card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #0f172a;
}
.home-about__card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #475569;
}
@media (max-width: 980px) {
  .home-about__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home-about__grid { grid-template-columns: 1fr; }
}

/* —— Главная: динамика + about cards v2 —— */
.home-dyn {
  margin: 0 0 20px;
}
.home-dyn__hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(15, 118, 110, .28);
  background:
    radial-gradient(ellipse 70% 90% at 90% -10%, rgba(45, 212, 191, .28), transparent 55%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(59, 130, 246, .16), transparent 50%),
    linear-gradient(145deg, #0b1220 0%, #0f3d3a 48%, #115e59 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  color: #fff;
}
.home-dyn__glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 55%;
  height: 70%;
  background: radial-gradient(circle, rgba(45, 212, 191, .22), transparent 68%);
  pointer-events: none;
  animation: homeDynGlow 8s ease-in-out infinite alternate;
}
@keyframes homeDynGlow {
  from { transform: translate(-4%, 2%) scale(1); opacity: .7; }
  to { transform: translate(3%, -4%) scale(1.08); opacity: 1; }
}
.home-dyn__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 16px 18px 8px;
}
.home-dyn__eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #99f6e4;
}
.home-dyn__head h2 {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.home-dyn__head p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255,255,255,.68);
}
.home-dyn__badge {
  display: grid;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
  text-align: right;
}
.home-dyn__badge small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
}
.home-dyn__badge strong {
  font-size: 22px;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: #ccfbf1;
}
.home-dyn__link {
  font-size: 12px;
  font-weight: 700;
  color: #99f6e4;
  text-decoration: none;
}
.home-dyn__link:hover { color: #fff; }
.home-dyn__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(220px, .75fr);
  gap: 12px;
  padding: 4px 16px 16px;
}
.home-dyn__chart {
  position: relative;
  height: 260px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.home-dyn__chart canvas {
  width: 100% !important;
  height: 100% !important;
}
.home-dyn__chart--donut {
  display: grid;
  place-items: center;
}
.home-dyn__donut-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  pointer-events: none;
  text-align: center;
  padding-bottom: 28px;
}
.home-dyn__donut-label b {
  font-size: 22px;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.home-dyn__donut-label span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.home-about__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.home-about__card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px 16px 18px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
  opacity: 0;
  transform: translateY(12px);
  animation: homeAboutIn .55s ease forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-about__card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #94a3b8;
}
.home-about__card--teal::before { background: linear-gradient(180deg, #14b8a6, #0f766e); }
.home-about__card--blue::before { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.home-about__card--amber::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
.home-about__card--violet::before { background: linear-gradient(180deg, #c4b5fd, #7c3aed); }
.home-about__card--green::before { background: linear-gradient(180deg, #4ade80, #16a34a); }
.home-about__card--slate::before { background: linear-gradient(180deg, #94a3b8, #475569); }
.home-about__card:hover {
  transform: translateY(-3px);
  border-color: #dbe3ee;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}
@keyframes homeAboutIn {
  to { opacity: 1; transform: none; }
}
.home-about__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.home-about__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 16px;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
}
.home-about__card--blue .home-about__icon { color: #2563eb; background: #eff6ff; border-color: #dbeafe; }
.home-about__card--amber .home-about__icon { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.home-about__card--violet .home-about__icon { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; }
.home-about__card--green .home-about__icon { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.home-about__card--slate .home-about__icon { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.home-about__step {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #94a3b8;
}
.home-about__card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: #0f172a;
}
.home-about__card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #475569;
}

@media (max-width: 980px) {
  .home-dyn__grid { grid-template-columns: 1fr; }
  .home-dyn__chart { height: 220px; }
  .home-about__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home-about__grid { grid-template-columns: 1fr; }
}

/* —— Главная: виджет смены в hero (горизонтальная полоса) —— */
.admin-content > .page-heading--home {
  align-items: center;
}
.home-shift {
  flex: 1 1 420px;
  min-width: min(100%, 380px);
  max-width: 560px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
  padding: 10px 14px;
  border-radius: 0;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  color: #fff;
}
.home-shift__id {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.home-shift__eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #99f6e4;
}
.home-shift__num {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.home-shift__main {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.home-shift__date {
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 52px;
  padding: 6px 10px 7px;
  border: 1px solid rgba(153, 246, 228, .28);
  background: rgba(15, 23, 42, .28);
  color: #ccfbf1;
  line-height: 1.05;
  text-align: center;
}
.home-shift__date b {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.home-shift__date span {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 650;
  text-transform: lowercase;
  color: rgba(204, 251, 241, .92);
}
.home-shift__date em {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(153, 246, 228, .3);
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 10px;
  color: #99f6e4;
}
.home-shift__times {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.home-shift__times b {
  font-size: 18px;
  letter-spacing: -.03em;
}
.home-shift__times span {
  color: rgba(255,255,255,.45);
  font-size: 13px;
}
.home-shift__bar {
  height: 5px;
  border-radius: 0;
  background: rgba(255,255,255,.14);
  overflow: hidden;
}
.home-shift__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5eead4, #99f6e4);
  box-shadow: 0 0 12px rgba(45, 212, 191, .45);
  transform-origin: left center;
  animation: homeBarIn .9s ease both;
}
.home-shift--done .home-shift__bar i {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
  box-shadow: none;
}
.home-shift--soon .home-shift__bar i {
  background: linear-gradient(90deg, #60a5fa, #93c5fd);
}
.home-shift__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 650;
  color: rgba(255,255,255,.7);
}
a.home-about__card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
@media (max-width: 900px) {
  .admin-content > .page-heading--home {
    flex-direction: column;
    align-items: stretch;
  }
  .home-shift {
    max-width: none;
    width: 100%;
    flex: 1 1 auto;
  }
}
@media (max-width: 560px) {
  .home-shift {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "id date"
      "main main";
  }
  .home-shift__id { grid-area: id; }
  .home-shift__main { grid-area: main; }
  .home-shift__date { grid-area: date; }
}

/* A11y: видимый фокус клавиатуры */
:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

/* iOS: ≥16px на полях ввода, чтобы не зумило при фокусе */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Пошаговые подсказки UI */
.ui-hint {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
}
.ui-hint[hidden] { display: none !important; }
.ui-hint.is-open { pointer-events: auto; }
.ui-hint__backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 1;
}
/* Затемнение рисуется тенью вокруг «окна» над целью — цель не нужно поднимать по z-index. */
.ui-hint__spot {
    position: fixed;
    z-index: 2;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .95), 0 0 0 9999px rgba(15, 23, 42, .45);
    transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}
.ui-hint__spot.is-none {
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, .45);
}
.ui-hint__card {
    position: fixed;
    z-index: 3;
    width: min(400px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .3);
    box-sizing: border-box;
}
.ui-hint__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ui-hint__card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
    color: #0f172a;
}
.ui-hint__card p {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    white-space: pre-line;
}
.ui-hint__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    width: 100%;
}
.ui-hint__gap {
    flex: 1 1 auto;
    min-width: 8px;
}
.ui-hint__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #d0d7de;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    outline: none;
    transform: none;
}
.ui-hint__btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.ui-hint__btn:disabled {
    opacity: .4;
    cursor: default;
}
.ui-hint__btn--go {
    min-width: 68px;
    border-color: #0f766e;
    background: #0d9488;
    color: #fff;
}
.ui-hint__btn--go:hover {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
@media (max-width: 420px) {
    .ui-hint__actions { flex-wrap: wrap; }
    .ui-hint__gap { display: none; }
    .ui-hint__btn { flex: 1 1 calc(50% - 6px); }
}
.ui-hints-launch {
    margin-left: 4px;
    white-space: nowrap;
    font-weight: 700;
    color: #0f766e !important;
    border-color: rgba(15, 118, 110, .28) !important;
}

/* Складской учёт */
.wh-page { display: grid; gap: 16px; min-width: 0; }
.wh-page .page-heading.wh-head { margin: 0 0 4px; align-items: center; }
.wh-head__actions { flex-wrap: wrap; justify-content: flex-end; }

.wh-sync {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  background: #fff;
}
.wh-sync b { display: block; font-size: 13px; line-height: 1.2; color: #111827; }
.wh-sync small { display: block; font-size: 12px; line-height: 1.2; color: #6b7280; }
.wh-sync__dot { width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex: 0 0 auto; }
.wh-sync.is-ok .wh-sync__dot { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.wh-sync.is-warn { border-color: #fcd34d; background: #fffbeb; }
.wh-sync.is-warn .wh-sync__dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.wh-sync.is-none { background: #f9fafb; }

.wh-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.wh-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}
.wh-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #cbd5e1;
}
.wh-stat.is-ok::before { background: #10b981; }
.wh-stat.is-warn::before { background: #f59e0b; }
.wh-stat.is-bad::before { background: #ef4444; }
.wh-stat--link { transition: border-color .15s, box-shadow .15s, transform .15s; }
.wh-stat--link:hover { border-color: #cbd5e1; box-shadow: 0 6px 18px rgba(15, 23, 42, .07); transform: translateY(-1px); }
.wh-stat__label { font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; }
.wh-stat__value { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: #111827; }
.wh-stat.is-bad .wh-stat__value { color: #dc2626; }
.wh-stat.is-warn .wh-stat__value { color: #b45309; }
.wh-stat__sub { font-size: 12.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wh-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: #fff;
}
.wh-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.wh-card__head h2 { margin: 0; font-size: 16px; font-weight: 800; color: #111827; }
.wh-card__head p { margin: 2px 0 0; font-size: 12.5px; color: #6b7280; }
.wh-link { font-size: 13px; font-weight: 700; color: var(--accent-dark, #0f766e); text-decoration: none; white-space: nowrap; }
.wh-link:hover { text-decoration: underline; }
.wh-note { padding: 14px; border-radius: 10px; background: #f8fafc; color: #6b7280; font-size: 13px; }
.wh-note.is-ok { background: #ecfdf5; color: #047857; }

.wh-grid2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }

.wh-bar { position: relative; display: block; height: 6px; border-radius: 99px; background: #eef2f6; overflow: hidden; }
.wh-bar > span { display: block; height: 100%; border-radius: inherit; background: #94a3b8; }
.wh-bar.is-ok > span { background: #10b981; }
.wh-bar.is-warn > span { background: #f59e0b; }
.wh-bar.is-bad > span { background: #ef4444; }

.wh-crit { list-style: none; margin: 0; padding: 0; }
.wh-crit li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 72px;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
}
.wh-crit li:first-child { border-top: 0; padding-top: 2px; }
.wh-crit__name { min-width: 0; }
.wh-crit__name strong { display: block; font-size: 13.5px; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-crit__name span { display: block; font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-crit__lvl { display: grid; gap: 4px; }
.wh-crit__lvl > span { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }
.wh-crit__def { text-align: right; color: #dc2626; font-size: 14px; font-variant-numeric: tabular-nums; }

.wh-locs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wh-locs a {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
}
.wh-locs a:hover { background: #f8fafc; }
.wh-locs a.is-active { border-color: rgba(15, 118, 110, .35); background: #f0fdfa; }
.wh-locs a.is-active .wh-bar > span { background: var(--accent, #14b8a6); }
.wh-locs__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wh-locs__name { font-size: 13.5px; font-weight: 700; color: #111827; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-locs__nums { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.wh-locs__nums b { font-size: 14px; font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.wh-locs__nums em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.wh-locs__nums em.is-bad { background: #fef2f2; color: #b91c1c; }
.wh-locs__nums em.is-warn { background: #fffbeb; color: #b45309; }

.wh-board { padding: 0; overflow: hidden; }
.wh-board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.wh-board__meta { font-size: 13px; color: #6b7280; white-space: nowrap; }

.wh-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #f1f5f9; gap: 2px; }
.wh-seg a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.wh-seg a b { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: rgba(15, 23, 42, .07); color: inherit; }
.wh-seg a:hover { color: #111827; }
.wh-seg a.is-active { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.wh-seg a.is-active b { background: var(--accent, #14b8a6); color: #fff; }

.wh-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0; }
.wh-qchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.wh-qchip b { font-size: 12px; color: #64748b; }
.wh-qchip:hover { border-color: #cbd5e1; background: #f8fafc; }
.wh-qchip.is-bad b { color: #dc2626; }
.wh-qchip.is-warn b { color: #b45309; }
.wh-qchip.is-active { border-color: #0f172a; background: #0f172a; color: #fff; }
.wh-qchip.is-active b { color: #fff; opacity: .8; }

.wh-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) minmax(190px, 240px) auto;
  align-items: end;
  gap: 12px;
  padding: 14px 20px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.wh-field { display: grid; gap: 5px; min-width: 0; margin: 0; }
.wh-field > span { font-size: 11.5px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }
.wh-field input,
.wh-field select {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  background-color: #fff;
  color: #111827;
  font: inherit;
  font-size: 14px;
}
.wh-field--search input {
  padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px 50%;
}
.wh-field input:focus,
.wh-field select:focus { outline: none; border-color: var(--accent, #14b8a6); box-shadow: 0 0 0 3px rgba(20, 184, 166, .15); }
.wh-filters__btns { display: flex; gap: 8px; }
.wh-filters__btns .button { height: 40px; }

.wh-empty { display: grid; justify-items: center; gap: 4px; padding: 48px 20px; text-align: center; color: #6b7280; font-size: 14px; }
.wh-empty b { color: #111827; font-size: 15px; }

.wh-table-wrap { margin: 0; border: 0; border-radius: 0; }
.wh-table { width: 100%; }
.wh-table th { white-space: nowrap; }
.wh-table th:first-child,
.wh-table td:first-child { padding-left: 20px; }
.wh-table th:last-child,
.wh-table td:last-child { padding-right: 20px; }
.wh-table td { vertical-align: middle; }
.wh-table .is-num { text-align: right; white-space: nowrap; }
.wh-table tr.is-low td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.wh-table tr.is-zero td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.wh-pos { display: grid; gap: 2px; min-width: 220px; }
.wh-pos strong { font-size: 13.5px; color: #111827; }
.wh-pos span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: #6b7280; }
.wh-pos code { font-size: 12px; padding: 1px 6px; border-radius: 5px; background: #f1f5f9; color: #334155; }
.wh-pos em { font-style: normal; }
.wh-qty { font-size: 14.5px; font-variant-numeric: tabular-nums; color: #111827; }
.wh-unit { margin-left: 4px; font-size: 12px; color: #6b7280; }
.wh-sub { margin-top: 2px; font-size: 12px; color: #94a3b8; }
.wh-lvl { display: grid; grid-template-columns: minmax(80px, 140px) 44px; align-items: center; gap: 10px; }
.wh-lvl > span { font-size: 12.5px; font-weight: 700; color: #475569; font-variant-numeric: tabular-nums; }
.wh-def { color: #dc2626; font-variant-numeric: tabular-nums; }
.wh-place { display: grid; gap: 2px; }
.wh-place strong { font-size: 13px; color: #111827; font-weight: 600; }
.wh-place span { font-size: 12px; color: #6b7280; }
.wh-mes {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 99px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.wh-mes.is-ok { background: #ecfdf5; color: #047857; }
a.wh-mes.is-ok:hover { background: #d1fae5; }
.wh-table time { font-size: 13px; color: #334155; font-variant-numeric: tabular-nums; }

.wh-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 20px; border-top: 1px solid #f1f5f9; font-size: 13px; color: #6b7280; }

.wh-onboard {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.wh-onboard__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: #fff; color: var(--accent-dark, #0f766e); border: 1px solid #e2e8f0; }
.wh-onboard h2 { margin: 0 0 4px; font-size: 18px; color: #111827; }
.wh-onboard p { margin: 0 0 14px; color: #6b7280; font-size: 14px; }
.wh-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: whstep; }
.wh-steps li { position: relative; display: grid; gap: 2px; padding: 12px 12px 12px 44px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; counter-increment: whstep; font-size: 13px; color: #6b7280; }
.wh-steps li::before {
  content: counter(whstep);
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #14b8a6);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.wh-steps b { color: #111827; font-size: 13.5px; }

@media (max-width: 1200px) {
  .wh-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wh-field--search { grid-column: 1 / -1; }
  .wh-filters__btns { grid-column: 1 / -1; }
  .wh-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .wh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wh-steps { grid-template-columns: 1fr; }
  .wh-page .page-heading.wh-head { flex-direction: column; align-items: stretch; }
  .wh-head__actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .wh-stats { grid-template-columns: 1fr; }
  .wh-filters { grid-template-columns: 1fr; }
  .wh-board__head { flex-direction: column; align-items: flex-start; }
  .wh-crit li { grid-template-columns: minmax(0, 1fr) 64px; }
  .wh-crit__lvl { grid-column: 1 / -1; grid-row: 2; }
  .wh-onboard { grid-template-columns: 1fr; }
}

/* Лицензия: красная полоса при истечении / отсутствии оплаты */
.license-expiry-banner {
  position: sticky;
  top: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  background: #b91c1c;
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(127, 29, 29, .35);
}
.license-expiry-banner__link {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
}
.license-expiry-banner__link:hover {
  border-bottom-color: #fff;
}
body.has-license-banner.admin-body .admin-shell,
body.has-license-banner.auth-page .auth-shell,
body.has-license-banner.install-page .install-shell {
  /* полоса sticky в потоке — дополнительный отступ не обязателен */
}

/* �� ��������: ������� ������� / ��������� �� */
.tooling-modal.modal--wide {
  width: min(96vw, 880px);
}
.tooling-modal .tooling-modal__card {
  padding: 0;
  overflow: hidden;
}
.tooling-modal .modal__header {
  padding: 18px 22px 14px;
}
.tooling-modal__lead {
  margin: 6px 0 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
}
.tooling-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr);
  gap: 0;
  min-height: 0;
  max-height: min(68vh, 560px);
  overflow: auto;
}
.tooling-modal__main {
  padding: 16px 22px 8px;
  border-right: 1px solid var(--line-soft);
}
.tooling-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.tooling-modal__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.tooling-modal__field--full {
  grid-column: 1 / -1;
}
.tooling-modal__field input,
.tooling-modal__field select,
.tooling-modal__field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .15s, box-shadow .15s;
}
.tooling-modal__field textarea {
  min-height: 84px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.45;
}
.tooling-modal__field input:hover,
.tooling-modal__field select:hover,
.tooling-modal__field textarea:hover {
  border-color: #b8c2cc;
}
.tooling-modal__field input:focus,
.tooling-modal__field select:focus,
.tooling-modal__field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 168, 150, .16);
}
.tooling-modal__field input::placeholder,
.tooling-modal__field textarea::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.tooling-modal__active {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-soft), transparent 120%);
  cursor: pointer;
}
.tooling-modal__active input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.tooling-modal__active span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tooling-modal__active b {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.tooling-modal__active small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}
.tooling-modal__photo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 14px;
  background:
    linear-gradient(180deg, rgba(26, 168, 150, .06), transparent 40%),
    var(--surface-2);
}
.tooling-modal__photo-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tooling-modal__photo-head b {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}
.tooling-modal__photo-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.tooling-modal__drop {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 220px;
  margin: 0;
  padding: 16px;
  border: 1.5px dashed #b7c5ce;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #fff 0%, #f7fafb 100%);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.tooling-modal__drop:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, #fff, var(--accent-soft));
  box-shadow: 0 0 0 3px rgba(26, 168, 150, .1);
}
.tooling-modal__drop.is-drag {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.tooling-modal__drop.has-photo {
  padding: 0;
  border-style: solid;
  border-color: var(--line);
  background: #0b1214;
}
.tooling-modal__drop.has-photo:hover {
  box-shadow: 0 0 0 3px rgba(26, 168, 150, .18);
}
.tooling-modal__drop img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}
.tooling-modal__drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.tooling-modal__drop.has-photo .tooling-modal__drop-empty {
  display: none;
}
.tooling-modal__drop-icon {
  color: var(--accent-dark);
  margin-bottom: 4px;
  opacity: .9;
}
.tooling-modal__drop-empty strong {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 750;
}
.tooling-modal__drop-empty em {
  color: var(--muted);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 500;
}
.tooling-modal__remove {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #9f1239;
  background: rgba(220, 76, 100, .08);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.tooling-modal__remove input {
  accent-color: #dc4c64;
}
.tooling-modal__actions {
  margin: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fafbfc, #f5f7f8);
}
.tooling-modal--cat {
  width: min(94vw, 480px);
}
.tooling-modal__cat-body {
  display: grid;
  gap: 12px;
  padding: 16px 22px 8px;
}
.tooling-modal__cat-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.tooling-modal__cat-row .tooling-modal__active {
  grid-column: auto;
  margin: 0;
  height: 100%;
  box-sizing: border-box;
}

html[data-theme="dark"] .tooling-modal__drop {
  background: linear-gradient(180deg, #1a2327, #141c1f);
  border-color: #3a484f;
}
html[data-theme="dark"] .tooling-modal__drop:hover {
  background: linear-gradient(180deg, #1e2a2e, rgba(26, 168, 150, .12));
}
html[data-theme="dark"] .tooling-modal__actions {
  background: linear-gradient(180deg, #141c1f, #10181b);
}
html[data-theme="dark"] .tooling-modal__main {
  border-right-color: var(--line);
}
html[data-theme="dark"] .tooling-modal__photo {
  background: linear-gradient(180deg, rgba(26, 168, 150, .08), transparent 40%), var(--surface-2);
}
html[data-theme="dark"] .tooling-modal__field input:hover,
html[data-theme="dark"] .tooling-modal__field select:hover,
html[data-theme="dark"] .tooling-modal__field textarea:hover {
  border-color: #4a5a62;
}

@media (max-width: 760px) {
  .tooling-modal__body {
    grid-template-columns: 1fr;
    max-height: min(72vh, 640px);
  }
  .tooling-modal__main {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .tooling-modal__grid {
    grid-template-columns: 1fr;
  }
  .tooling-modal__field--full {
    grid-column: auto;
  }
  .tooling-modal__drop,
  .tooling-modal__drop img {
    min-height: 160px;
  }
  .tooling-modal__cat-row {
    grid-template-columns: 1fr;
  }
}

/* Оснастка: таблица — слева компактно, центр наименование, справа статус/действия */
.data-table.tooling-table {
  table-layout: fixed;
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}
.data-table.tooling-table .tooling-table__col--photo { width: 64px; }
.data-table.tooling-table .tooling-table__col--cat { width: 12%; }
.data-table.tooling-table .tooling-table__col--article { width: 14%; }
.data-table.tooling-table .tooling-table__col--name { width: 34%; }
.data-table.tooling-table .tooling-table__col--material { width: 14%; }
.data-table.tooling-table .tooling-table__col--status { width: 10%; }
.data-table.tooling-table .tooling-table__col--actions { width: 96px; }

.data-table.tooling-table thead th,
.data-table.tooling-table tbody td {
  box-sizing: border-box;
  vertical-align: middle;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 12px 10px !important;
  line-height: 1.35;
}
.data-table.tooling-table thead th {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  text-align: center !important;
}

/* Фото */
.data-table.tooling-table tbody td:nth-child(1) { text-align: center; }
/* Категория / артикул — чуть левее внутри своей колонки */
.data-table.tooling-table tbody td:nth-child(2),
.data-table.tooling-table tbody td:nth-child(3) { text-align: center; }
/* Наименование — визуальный центр таблицы */
.data-table.tooling-table thead th:nth-child(4),
.data-table.tooling-table tbody td:nth-child(4) { text-align: center !important; }
/* Материал / статус / действия — справа */
.data-table.tooling-table tbody td:nth-child(5),
.data-table.tooling-table tbody td:nth-child(6),
.data-table.tooling-table tbody td:nth-child(7) { text-align: center; }

.data-table.tooling-table .tooling-table__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.data-table.tooling-table .tooling-table__cell--cat {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-align: center;
  place-content: center;
}
.data-table.tooling-table .tooling-table__cell--name {
  justify-content: center;
  text-align: center;
  padding: 0 8px;
}
.data-table.tooling-table .tooling-table__cell--name b {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.4;
}
.data-table.tooling-table .tooling-table__cell--article code {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.data-table.tooling-table .tooling-table__cell--material .tooling-mat {
  justify-content: center;
  flex-wrap: wrap;
}
.data-table.tooling-table .tooling-table__cell--status .state {
  white-space: nowrap;
}
.data-table.tooling-table .tooling-table__btns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.data-table.tooling-table .tooling-table__btns form {
  margin: 0;
}
.data-table.tooling-table .tooling-table__thumb {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  background: #e8eef1;
  cursor: zoom-in;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.data-table.tooling-table .tooling-table__thumb:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 168, 150, .16);
  transform: translateY(-1px);
}
.data-table.tooling-table .tooling-table__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.data-table.tooling-table .tooling-table__no-photo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
}

.tooling-lb {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 24px;
  background: rgba(2, 6, 23, .88);
  color: inherit;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
}
.tooling-lb[open],
.tooling-lb.is-open {
  display: flex;
}
.tooling-lb::backdrop {
  background: rgba(2, 6, 23, .72);
}
.tooling-lb__img {
  max-width: min(92vw, 1100px);
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  object-fit: contain;
  background: #0b1214;
}
.tooling-lb__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.tooling-lb__close:hover {
  background: rgba(255, 255, 255, .28);
}
.tooling-lb__cap {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .82);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tooling-modal__file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.tooling-modal__drop {
  position: relative;
}
.tooling-modal__preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}
.tooling-modal__pick {
  margin-top: 8px;
  pointer-events: auto;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
}
.tooling-modal__change {
  width: 100%;
  justify-content: center;
}
.tooling-modal__drop.has-photo .tooling-modal__drop-empty {
  display: none !important;
}
@media (max-width: 760px) {
  .data-table.tooling-table {
    min-width: 680px;
  }
  .tooling-modal__preview {
    min-height: 160px;
  }
}

/* �� ��������: ISO-������ ���-���� ��������� �� */
.tooling-mat {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tooling-mat__chip {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--tm, #64748b) 16%, #fff);
  color: var(--tm, #64748b);
  border: 1px solid color-mix(in srgb, var(--tm, #64748b) 45%, #fff);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
}
.tooling-mat-pick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.tooling-mat-pick__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .12s;
  user-select: none;
  outline: none;
}
.tooling-mat-pick__item input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.tooling-mat-pick__item:hover {
  border-color: color-mix(in srgb, var(--tm, var(--accent)) 55%, var(--line));
  background: color-mix(in srgb, var(--tm, var(--accent)) 8%, var(--surface));
}
.tooling-mat-pick__item:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm, var(--accent)) 22%, transparent);
}
.tooling-mat-pick__item.is-on,
.tooling-mat-pick__item[aria-checked="true"] {
  border-color: var(--tm, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm, var(--accent)) 18%, transparent);
  background: color-mix(in srgb, var(--tm, var(--accent)) 14%, var(--surface));
  transform: translateY(-1px);
}
.tooling-mat-pick__item.is-disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.tooling-mat-pick__letter {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--tm, var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}
.tooling-mat-pick__label {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
}
.tooling-modal__hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}
.tooling-modal__hint b {
  color: var(--text);
  font-weight: 750;
}
.tooling-modal__active--mat {
  grid-column: 1 / -1;
  margin-top: 2px;
}
@media (max-width: 560px) {
  .tooling-mat-pick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
