@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #f3f5f7;
  --surface: #fff;
  --surface-2: #f7faf9;
  --sidebar: #0c1518;
  --sidebar-2: #122024;
  --text: #0f172a;
  --muted: #5c6570;
  --line: #d7dde3;
  --line-soft: #e8ecf0;
  --accent: #1aa896;
  --accent-dark: #0f8f7e;
  --accent-soft: #e6f7f4;
  --green: #19a974;
  --red: #dc4c64;
  --blue: #3984e7;
  --violet: #8957e5;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
  --sidebar-width: 264px;
  --topbar-h: 76px;
  --font: "Manrope", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}
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: "Manrope", "Segoe UI", sans-serif;
}
.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%, 560px); margin: 0 auto; }
.install-steps-viewport {
  position: relative;
  overflow: hidden;
  min-height: min(72vh, 520px);
}
.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; }
}

/* 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: #d5dae0;
  color: #374151;
  background: #fff;
}
.button--ghost:hover {
  border-color: #c5ccd4;
  background: #f7f8fa;
}
.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; }
.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); }
.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: 'в–ѕ'; margin-left: auto; color: #5f6670; font-size: 10px; transition: transform .18s; }
.nav-group[open] > summary::after { transform: rotate(180deg); }
.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: #fff;
  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;
  align-items: center;
  gap: 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: #fff; 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: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); align-items: flex-start; gap: 16px; box-shadow: none; }
.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: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

/* Единая тонкая обводка карточек/блоков по сайту */
.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: 1px solid var(--line);
  box-shadow: none;
}
.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: #fff;
  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-attention {
  margin-bottom: 16px;
  padding: 18px 18px 16px;
  border: 1px solid #f0d9a0;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(26,168,150,.1), transparent 42%),
    linear-gradient(180deg, #fffdf8, #fff);
}
.dash-attention.is-clear {
  border-color: #ccebdc;
  background:
    linear-gradient(135deg, rgba(34,197,94,.08), transparent 45%),
    linear-gradient(180deg, #f7fdf9, #fff);
}
.dash-attention__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dash-attention__head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}
.dash-attention__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #f5d79a;
  background: #fff8ea;
  color: #92400e;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.dash-attention__badge.is-critical {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.dash-attention__badge.is-ok {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}
.dash-attention__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.dash-attention__card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #ebe7df;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dash-attention__card:hover {
  transform: translateY(-2px);
  border-color: #f0c56d;
  box-shadow: 0 12px 24px rgba(20, 24, 30, .07);
}
.dash-attention__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dash-attention__tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7280;
}
.dash-attention__card.severity-critical .dash-attention__tag { color: #b91c1c; }
.dash-attention__card.severity-warning .dash-attention__tag { color: var(--accent-dark); }
.dash-attention__card.severity-info .dash-attention__tag { color: #1d4ed8; }
.dash-attention__card.severity-critical {
  border: 2px solid #dc2626;
  background: linear-gradient(180deg, #fff5f5, #ffffff);
}
.dash-attention__card.severity-critical {
  animation: dashAttentionBlinkRed 1.2s ease-in-out infinite;
}
@keyframes dashAttentionBlinkRed {
  0%, 100% {
    border-color: #dc2626;
    box-shadow: none;
  }
  50% {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .16);
  }
}
.dash-attention__card.is-setup-overdue {
  border: 2px solid #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
  background: linear-gradient(180deg, #fef2f2, #fff);
}
.dash-attention__card.is-setup-overdue:hover {
  border-color: #b91c1c;
  box-shadow: 0 12px 24px rgba(185, 28, 28, .12);
}
.dash-attention__alert {
  margin: 6px 0 0;
  color: #b91c1c;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.35;
}
.dash-attention__count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-size: 13px;
}
.dash-attention__card.severity-critical .dash-attention__count { background: #dc2626; }
.dash-attention__card.severity-warning .dash-attention__count { background: #d97706; }
.dash-attention__card.severity-info .dash-attention__count { background: #2563eb; }
.dash-attention__card strong {
  font-size: 14px;
  line-height: 1.3;
}
.dash-attention__card p {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}
.dash-attention__ok {
  margin: 0;
  color: #3f6b58;
  font-size: 13px;
}

.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--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-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
}
.pl-hero__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.pl-kpi {
    position: relative;
    overflow: hidden;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: none;
}
.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 {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(25, 169, 116, .12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}
.pl-kpi--work {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(57, 132, 231, .12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}
.pl-kpi--time {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(137, 87, 229, .10), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8f5ff 100%);
}
.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: grid;
    gap: 2px;
    margin-bottom: 12px;
}
.pl-metal__head strong {
    font-size: 14px;
}
.pl-metal__head small {
    color: rgba(255,255,255,.55);
    font-size: 12px;
}
.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 {
    font-size: 12px;
    font-weight: 700;
    color: #2dd4bf;
    white-space: nowrap;
}

.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(180px, 1.4fr) minmax(320px, 1.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; }
.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: repeat(7, minmax(0, 1fr));
    gap: 4px;
    padding: 0;
}
.pl-tile__stats > div {
    padding: 3px 6px;
    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 b {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
    color: #123a6b;
}
.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-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-wrap: nowrap;
    align-items: center;
    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--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(160px, 1fr) minmax(0, 1.4fr) auto;
    }
    .pl-tile__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .pl-tile__eta {
        grid-column: span 2;
    }
}
@media (max-width: 980px) {
    .pl-hero { grid-template-columns: 1fr; }
    .pl-tile__strip {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .pl-tile__side { justify-content: flex-start; }
}
@media (max-width: 640px) {
    .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-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
    margin: 0 0 12px;
    padding: 6px 8px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(255,255,255,.95), rgba(241,245,249,.9));
}
.shift-flow__step {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    flex: 1 1 140px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.shift-flow__step:hover {
    background: rgba(255,255,255,.9);
    border-color: rgba(15, 23, 42, .08);
}
.shift-flow__step.is-active {
    background: #fff;
    border-color: rgba(29, 78, 216, .22);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}
.shift-flow__step em {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}
.shift-flow__step.is-active em { background: #1d4ed8; }
.shift-flow__step span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.shift-flow__step strong {
    font-size: 13px;
    letter-spacing: -.02em;
    color: #0f172a;
}
.shift-flow__step small {
    color: #7b8491;
    font-size: 11px;
}
.shift-flow__step b {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}
.shift-flow__arrow {
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    padding: 0 2px;
}
@media (max-width: 720px) {
    .shift-flow__arrow { display: none; }
}

/* РљР°СЂС‚РѕС‡РєРё СЃРјРµРЅРЅРѕР№ РЅР°Р»Р°РґРєРё */
.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: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 8px 14px;
    min-width: 0;
}
.scm-cells .scm-cell--name,
.scm-cells .scm-cell--setup {
    grid-column: span 2;
}
.scm-cells .rcm-cell {
    padding: 8px 12px;
    min-height: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.scm-cells .rcm-cell > b { font-size: 12px; }
.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: 32px;
    margin-top: 2px;
    padding: 0 8px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    font-size: 12px;
    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 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .scm-cells .scm-cell--name,
    .scm-cells .scm-cell--setup { grid-column: span 1; }
}
@media (max-width: 560px) {
    .scm-cells { grid-template-columns: 1fr; }
    .scm-cells .scm-cell--name,
    .scm-cells .scm-cell--setup { grid-column: 1 / -1; }
}
.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: 8px;
    margin-bottom: 10px;
}
.prod-card__meta--row1,
.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: 9px 11px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 12px;
    background: rgba(255,255,255,.9);
}
.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: 3px;
    font-size: 12px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.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) auto;
    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;
}
.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: 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,
    .prod-card__form-submit {
        grid-column: 1 / -1;
    }
    .prod-card__form-submit { width: 100%; }
}

.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__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;
}
@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;
    }
}
.rcm-crew-modal .modal__body {
    padding: 4px 18px 18px;
}
.rcm-crew.rcm-crew--modal {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    gap: 14px;
}
.rcm-crew.rcm-crew--modal .rcm-crew__block {
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 12px;
    background: #f8fafc;
}
.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: #3984e7; }
.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, #2dd4bf); }
.rc-charts__bars .is-work::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.rc-charts__bars .is-incident::before { background: linear-gradient(90deg, #dc2626, #fb7185); }
.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: #1f6f8b; }
.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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, "IBM Plex Sans", sans-serif;
  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: Manrope, sans-serif;
  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: Manrope, sans-serif;
  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: Manrope, sans-serif;
  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: Manrope, sans-serif;
  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: 6px 8px;
    border-radius: 8px;
    white-space: nowrap;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mon-timeline-list { display: grid; gap: 8px; }
.mon-timeline-row {
    display: grid;
    grid-template-columns: 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: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}
.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--copper .rcm-chip__ava { background: #9a3412; }
.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(4, minmax(0, 1fr));
}
.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: 52px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.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--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: 66px;
    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, #96d56d, #78bd47); }
.rcm-gantt__track--setup .rcm-gantt__lane b.is-planned {
    /* РќР°Р»Р°РґРєР° РµС‰С‘ РЅРµ РІР·СЏС‚Р° РІ СЂР°Р±РѕС‚Сѓ в†’ "РїСЂРѕСЃС‚РѕР№" */
    background: linear-gradient(90deg, #fb7185, var(--accent));
    opacity: .95;
}
.rcm-gantt__track--setup .rcm-gantt__lane b.is-active {
    /* РќР°Р»Р°РґС‡РёРє РІР·СЏР» РІ СЂР°Р±РѕС‚Сѓ в†’ СЃРёРЅРёР№ */
    background: linear-gradient(90deg, #93c5fd, #3b82f6);
    opacity: .95;
}
.rcm-gantt__track--setup .rcm-gantt__lane b.is-done {
    /* РќР°Р»Р°РґРєР° Р·Р°РІРµСЂС€РµРЅР° в†’ Р·РµР»С‘РЅС‹Р№ */
    background: linear-gradient(90deg, #96d56d, #78bd47);
    opacity: .95;
}
.rcm-gantt__track--work .rcm-gantt__lane b { background: linear-gradient(90deg, #70cfd2, #4db5b8); }
.rcm-gantt__track--work .rcm-gantt__lane b.is-planned {
    background: linear-gradient(90deg, #c7ced8, #abb6c4);
}
.rcm-gantt__track--incident .rcm-gantt__lane b { background: linear-gradient(90deg, #f18a8c, #ea6366); }
.rcm-gantt__track--idle .rcm-gantt__lane b {
    background: repeating-linear-gradient(
        -45deg,
        rgba(163, 174, 190, .34),
        rgba(163, 174, 190, .34) 3px,
        rgba(163, 174, 190, .14) 3px,
        rgba(163, 174, 190, .14) 6px
    );
    opacity: .8;
    border-radius: 3px;
}
.rcm-gantt.is-overflow .rcm-gantt__head strong::after {
    content: " в†’";
    color: var(--accent-dark);
}
.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: var(--accent); }
.rcm-gantt__legend .is-work::before { background: #3b82f6; }
.rcm-gantt__legend .is-planned::before { background: #94a3b8; }
.rcm-gantt__legend .is-incident::before { background: #ef4444; }
.rcm-gantt__legend .is-idle::before {
    background: repeating-linear-gradient(-45deg, #94a3b8, #94a3b8 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--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: #fff; 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;
}
.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 {
  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;
}
.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--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: 8px; }
.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 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; }
.setup-create-row [data-remove-setup-row] { width: 28px; height: 35px; border: 0; border-radius: 6px; color: #a94e5c; background: #fff0f2; cursor: pointer; }
@media (max-width: 680px) {
  .setup-create-row { grid-template-columns: 1fr; }
  .setup-create-row [data-remove-setup-row] { 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__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); }
@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(3, minmax(0, 1fr)); gap: 16px; }
.machine-tile { display: flex; min-height: 310px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: none; flex-direction: column; }
.machine-tile__top { display: flex; align-items: center; justify-content: space-between; }
.machine-tile__title { margin: 18px 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.machine-tile__title h2 { margin: 0 0 3px; font-size: 16px; }
.machine-tile__title span { color: #969da5; font-size: 9px; font-weight: 700; }
.machine-tile dl { display: grid; margin: 0; grid-template-columns: 1fr 1fr; gap: 12px; }
.machine-tile dl div { min-width: 0; }
.machine-tile dt { color: #9aa0a7; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.machine-tile dd { overflow: hidden; margin: 3px 0 0; color: #3f464e; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.machine-tile > p { margin: 15px 0 0; color: #858c95; font-size: 9px; }
.machine-tile__station {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.machine-tile__station > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #969da5;
}
.machine-tile__station code {
  display: block;
  font-size: 10px;
  line-height: 1.35;
  word-break: break-all;
  color: #4b5563;
}
.machine-tile__station-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.machine-tile__station-actions .button { min-height: 30px; font-size: 9px; }
.machine-tile__actions { display: flex; margin-top: auto; padding-top: 18px; align-items: center; gap: 8px; }
.machine-tile__actions form { margin: 0; }
.machine-tile__actions .button { min-height: 34px; font-size: 9px; }
.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-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; }
.role-fields { margin-bottom: 25px; }
.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: 9px; }
.permission-groups small { color: #a0a6ad; font-size: 8px; }

/* 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;
}
.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 {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex: 0 0 auto;
  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);
}
.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 strong {
  color: #111827;
}
.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-form-grid {
  gap: 12px;
}
.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: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.qc-entry-head h4 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
}
.qc-entry-head__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.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: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
}
.qc-entry-row__note {
  grid-column: 1 / -1;
}
.qc-entry-row__spacer {
  visibility: hidden;
  pointer-events: none;
}
.qc-entry-row__spacer span,
.qc-entry-row__spacer input {
  display: none;
}
.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-entry-row,
  .qc-rework-grid {
    grid-template-columns: 1fr;
  }
  .qc-entry-row__spacer {
    display: none;
  }
}
/* .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; }
.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: #fff; 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 {
  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-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: 140px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
  border: 1px solid #e2e8f0;
}
.mon-oee-v2__donut {
  position: relative;
  width: 140px;
  height: 140px;
}
.mon-oee-v2__donut canvas { width: 100% !important; height: 100% !important; }
.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: 30px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.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;
}
.mon-machine:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.mon-machine--free { border-left-color: #22c55e; }
.mon-machine--idle { border-left-color: #94a3b8; }
.mon-machine--setup { border-left-color: #f59e0b; }
.mon-machine--working,
.mon-machine--progress { border-left-color: #0ea5e9; }
.mon-machine--incident { border-left-color: #ef4444; 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: #dcfce7; color: #15803d; }
.mon-machine--working .mon-machine__top span,
.mon-machine--progress .mon-machine__top span { background: #e0f2fe; color: #0369a1; }
.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: #f1f5f9; color: #64748b; }
.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: #22c55e; }
.mon-dot--idle { background: #94a3b8; }
.mon-dot--setup { background: #c47a14; }
.mon-dot--working,
.mon-dot--progress { background: #1f6f8b; }
.mon-dot--incident { background: #ef4444; }
.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; }
}

/* 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;
}
[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;
}

/* Р“Р»Р°РІРЅР°СЏ: СЃС‚Р°С‚РёСЃС‚РёРєР° Рё РєР°СЂС‚РѕС‡РєРё СЃС‚Р°РЅРєРѕРІ */
.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;
  }
  .shift-flow {
    flex-wrap: wrap;
    gap: 8px;
  }
  .shift-flow__arrow {
    display: none;
  }
  .shift-flow__step {
    flex: 1 1 100%;
  }
  .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;
  }
  .dash-attention__grid,
  .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 .sidebar {
  display: none !important;
}
.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 .menu-button,
.admin-body.is-android-app .sidebar-backdrop,
.admin-body.is-android-app [data-sidebar-toggle] {
  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: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  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-side {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #f7f8fa;
}
.wiki-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px 8px;
  border-bottom: 0;
  background: #fafbfc;
}
.wiki-side__actions {
  display: flex;
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}
.wiki-clear-btn {
  width: 100%;
  justify-content: center;
}
.wiki-nav__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 12px;
  color: #5b6573;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.wiki-nav__item:hover { background: #fff; color: #151a21; }
.wiki-nav__item.is-active {
  background: #fff;
  color: #151a21;
  box-shadow: inset 3px 0 0 var(--accent);
}
.wiki-side__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 10px 8px 12px;
}
.wiki-catalog__search {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e4e7eb;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  flex: 0 0 auto;
}
.wiki-side__articles {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.wiki-section-articles {
  display: none;
  flex-direction: column;
  gap: 2px;
}
.wiki-section-articles.is-active,
.wiki-section-articles:not([hidden]) {
  display: flex;
}
.wiki-section-articles[hidden] { display: none !important; }
.wiki-cat__link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  color: #5b6573;
  font-size: 12.5px;
  cursor: pointer;
}
.wiki-cat__link:hover,
.wiki-cat__link.is-active {
  background: #fff;
  color: #151a21;
}
.wiki-cat__link.is-filtered-out { display: none; }
.wiki-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
}
.wiki-reader {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 16px 18px;
}
.wiki-reader[hidden] { display: none !important; }
.wiki-reader__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex: 0 0 auto;
}
.wiki-reader__head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.wiki-reader__head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.wiki-reader__body {
  flex: 1;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.55;
  color: #3a4450;
  font-size: 14px;
  padding-right: 4px;
}
.wiki-reader__related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.wiki-reader__related:empty { display: none; }
.wiki-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  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__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.wiki-msg__links button {
  border: 1px solid #e4e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #2a313a;
}
.wiki-msg__links 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 {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    min-height: 70vh;
  }
  .wiki-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 220px;
  }
  .wiki-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
  }
  .wiki-nav__item {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .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;
}

.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;
  }
}
