
/* Мобильный UI сотрудника */
body.emp-mode {
  overflow: hidden;
  background: #0b1220;
}
body.emp-mode .sidebar,
body.emp-mode .mobile-tabbar,
body.emp-mode #sidebar-backdrop {
  display: none !important;
}
#emp-app {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0f172a 0%, #111827 40%, #0b1220 100%);
  color: #e2e8f0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.emp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.emp-brand { font-weight: 800; font-size: 18px; letter-spacing: 0.02em; }
.emp-user { font-size: 13px; color: #94a3b8; max-width: 50%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-stories-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 14px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.emp-stories-rail::-webkit-scrollbar { display: none; }
.emp-story-item, .emp-story-add {
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  cursor: pointer;
}
.emp-story-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 2px #0f172a;
}
.emp-story-avatar.plus {
  background: #1e293b;
  border-style: dashed;
  font-size: 22px;
  color: #38bdf8;
}
.emp-story-name { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 90px;
  -webkit-overflow-scrolling: touch;
}
body.ex-picking .emp-tabbar,
body.ex-picking #home-btn,
body.ex-picking .mobile-tabbar {
  pointer-events: none !important;
}
.emp-tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid #1e293b;
  padding: 6px 4px max(8px, env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
}
.emp-tab {
  flex: 1;
  background: none;
  border: none;
  color: #64748b;
  padding: 6px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
}
.emp-tab.active { color: #38bdf8; }
.emp-tab-icon { font-size: 18px; line-height: 1.2; }
.emp-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.emp-card.pinned { border-color: #0ea5e9; }
.emp-card-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.emp-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff;
}
.emp-card-author { font-weight: 700; font-size: 14px; }
.emp-card-date { font-size: 11px; color: #64748b; }
.emp-card-title { font-weight: 700; margin-bottom: 4px; }
.emp-card-body { font-size: 14px; line-height: 1.45; color: #e2e8f0; }
.emp-compose {
  background: #1e293b;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #334155;
}
.emp-compose textarea {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  color: #e2e8f0;
  padding: 10px;
  resize: vertical;
  font: inherit;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.emp-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
.emp-btn-danger {
  width: 100%;
  margin-top: 12px;
  background: #7f1d1d;
  color: #fecaca;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
.emp-empty, .emp-loading, .emp-hint {
  color: #94a3b8;
  font-size: 13px;
  padding: 12px 4px;
  line-height: 1.4;
}
.emp-section-title { font-size: 20px; font-weight: 800; margin: 8px 0 12px; }
.emp-tiles { display: grid; gap: 10px; }
.emp-tile {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.emp-stories-grid { display: grid; gap: 10px; }
.emp-story-card {
  border-radius: 16px;
  min-height: 120px;
  padding: 14px;
  color: #fff;
  cursor: pointer;
}
.emp-story-card-author { font-size: 12px; opacity: 0.9; margin-bottom: 8px; }
.emp-story-card-text { font-size: 16px; font-weight: 700; }
.emp-story-view {
  display: none;
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,0.85);
  align-items: center; justify-content: center;
  padding: 20px;
}
.emp-story-view.open { display: flex; }
.emp-story-view-inner {
  width: min(400px, 100%);
  min-height: 50vh;
  border-radius: 18px;
  padding: 16px;
  color: #fff;
  position: relative;
}
.emp-story-view-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; font-weight: 700;
}
.emp-story-view-top button {
  background: rgba(0,0,0,0.25); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
}
.emp-story-view-text { font-size: 20px; font-weight: 700; margin-top: 20px; }
.emp-embed-bar { margin-bottom: 10px; }
.emp-embed-bar button {
  background: #1e293b; color: #e2e8f0; border: 1px solid #334155;
  border-radius: 10px; padding: 8px 12px; cursor: pointer;
}
.emp-embed {
  background: #fff;
  color: #0f172a;
  border-radius: 16px;
  overflow: auto;
  max-height: calc(100vh - 160px);
  padding: 8px;
}

/* Login registration */
.login-card .login-tabs {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.login-card .login-tabs button {
  flex: 1; padding: 8px; border-radius: 8px; border: 1px solid #334155;
  background: #1e293b; color: #94a3b8; cursor: pointer;
}
.login-card .login-tabs button.active {
  background: #0ea5e9; color: #fff; border-color: #0ea5e9;
}
.login-card .login-hint {
  font-size: 12px; color: #94a3b8; margin: 8px 0 0; line-height: 1.35;
}

.emp-logout-top {
  border: 1px solid #475569;
  background: #1e293b;
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.emp-embed {
  background: #f8fafc;
  color: #0f172a;
  border-radius: 16px;
  overflow: auto;
  max-height: calc(100vh - 150px);
  min-height: 50vh;
  padding: 10px;
  -webkit-overflow-scrolling: touch;
}
.emp-page-content {
  background: transparent !important;
  padding: 0 !important;
  min-height: 40vh;
}
.emp-embed-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.emp-embed-title {
  font-weight: 700;
  font-size: 15px;
  color: #e2e8f0;
}
.emp-embed-bar button {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}
/* внутри эмбеда — светлые карточки CRM */
#emp-embed .tr-card,
#emp-embed .tr-stack,
#emp-embed [style*="background:#fff"] {
  max-width: 100%;
}
#emp-embed button {
  max-width: 100%;
}


/* Полноэкранный режим чек-листов: без ленты/stories, только контент + tabbar */
body.emp-embed-mode .emp-stories-rail {
  display: none !important;
}
body.emp-embed-mode .emp-top {
  display: none !important;
}
body.emp-embed-mode #emp-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
body.emp-embed-mode .emp-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}
body.emp-embed-mode .emp-embed-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #1e293b;
}
body.emp-embed-mode .emp-embed-bar button {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  flex-shrink: 0;
}
body.emp-embed-mode .emp-embed-title {
  font-weight: 800;
  font-size: 15px;
  color: #f8fafc;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.emp-embed-mode .emp-embed {
  max-height: none !important;
  height: auto;
  min-height: calc(100vh - 120px);
  border-radius: 0;
  padding: 12px;
  background: #f8fafc;
}
body.emp-embed-mode .emp-tabbar {
  display: flex !important;
}

/* Photo modal */
.emp-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  touch-action: manipulation;
}
.emp-photo-modal img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.emp-photo-modal-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  background: #fff;
  color: #0f172a;
  border: none;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}
.emp-cl-add-photo,
.emp-cl-add-cam {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 16px;
  min-height: 44px;
  background: #f0f9ff;
  border: 1px dashed #7dd3fc;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #0369a1;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(3,105,161,.15);
}
.emp-cl-add-photo.is-busy { opacity: 0.7; }
.emp-cl-photo-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 32px;
  cursor: pointer;
}
.emp-cl-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  flex-shrink: 0;
  cursor: zoom-in;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(15,23,42,.12);
}
.emp-cl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  pointer-events: none;
}
.emp-cl-thumb img.emp-cl-photo-view { pointer-events: none; }


/* === Темы оформления сотрудника === */
.emp-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.emp-theme-btn {
  text-align: left;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: inherit;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}
.emp-theme-btn.active {
  outline: 2px solid #38bdf8;
  background: rgba(56,189,248,0.15);
}
.emp-theme-name { display:block; font-weight:800; font-size:14px; }
.emp-theme-desc { display:block; font-size:11px; opacity:0.7; margin-top:2px; }
.emp-task-card:active { transform: scale(0.98); opacity: 0.92; }

body.emp-theme-ocean #emp-app {
  background: linear-gradient(180deg, #0c4a6e 0%, #075985 40%, #0f172a 100%) !important;
}
body.emp-theme-coffee #emp-app {
  background: linear-gradient(180deg, #44403c 0%, #292524 45%, #1c1917 100%) !important;
}
body.emp-theme-mint #emp-app {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 35%, #f0fdf4 100%) !important;
  color: #064e3b !important;
}
body.emp-theme-mint .emp-top,
body.emp-theme-mint .emp-tabbar {
  background: rgba(255,255,255,0.85) !important;
  color: #064e3b !important;
  border-color: #a7f3d0 !important;
}
body.emp-theme-berry #emp-app {
  background: linear-gradient(180deg, #4c1d95 0%, #5b21b6 40%, #1e1b4b 100%) !important;
}
body.emp-theme-light #emp-app {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 40%, #f1f5f9 100%) !important;
  color: #0f172a !important;
}
body.emp-theme-light .emp-top,
body.emp-theme-light .emp-tabbar {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
body.emp-theme-light .emp-card {
  background: #fff !important;
  color: #0f172a !important;
}


/* Хаб графика для управляющего */
.emp-hub-list { display: grid; gap: 10px; }
.emp-hub-item {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: inherit;
  border-radius: 14px;
  padding: 14px 14px;
  cursor: pointer;
}
.emp-hub-title { font-weight: 800; font-size: 15px; }
.emp-hub-desc { font-size: 12px; opacity: 0.75; margin-top: 4px; }
.emp-page-host { background: #fff; color: #0f172a; border-radius: 12px; padding: 8px; }
body.emp-theme-light .emp-hub-item {
  background: #fff;
  border-color: #e2e8f0;
  color: #0f172a;
}


/* ---- Мобильная адаптация CRM-страниц внутри emp-shell ---- */
body.emp-mode #page-content,
body.emp-mode .emp-page-host {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
}
body.emp-mode #page-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}
body.emp-mode #page-content input,
body.emp-mode #page-content select,
body.emp-mode #page-content textarea,
body.emp-mode #page-content button {
  max-width: 100%;
  font-size: 15px;
}
body.emp-mode #pins-root,
body.emp-mode #pins-root > div {
  overflow-x: auto;
}
body.emp-mode #pins-root table td,
body.emp-mode #pins-root table th {
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 8px !important;
}
body.emp-mode #page-content h3 {
  font-size: 17px;
}
body.emp-mode #page-content [style*="display:flex"] {
  flex-wrap: wrap !important;
}
body.emp-mode #page-content [style*="grid-template-columns"] {
  grid-template-columns: 1fr !important;
}
body.emp-mode #page-content .ref-card,
body.emp-mode #page-content [class*="card"] {
  max-width: 100%;
}

/* Телефонный справочник */
.emp-phone-list { display: grid; gap: 8px; }
.emp-phone-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 12px 14px;
}
body.emp-theme-light .emp-phone-row,
body.emp-theme-mint .emp-phone-row {
  background: #fff;
  border-color: #e2e8f0;
  color: #0f172a;
}
.emp-phone-name { font-weight: 800; font-size: 15px; }
.emp-phone-meta { font-size: 12px; opacity: 0.7; margin-top: 2px; }
.emp-phone-actions { text-align: right; flex-shrink: 0; }
.emp-phone-num { display: block; font-weight: 700; color: #38bdf8; text-decoration: none; font-size: 14px; }
.emp-phone-call {
  display: inline-block; margin-top: 6px; padding: 6px 10px;
  background: #22c55e; color: #fff; border-radius: 10px;
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.emp-phone-empty { font-size: 12px; color: #94a3b8; }
.emp-phone-note {
  margin-top: 6px;
  padding: 6px 8px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.emp-phone-note-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 10px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.emp-phone-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: -4px 0 10px;
  line-height: 1.35;
}


/* Карточки списков (сотрудники, кандидаты, переводы) */
.m-card-list { display: grid; gap: 10px; }
.m-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
.m-card-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.m-card-title { font-weight: 800; font-size: 15px; line-height: 1.25; }
.m-card-sub { font-size: 13px; color: #64748b; margin-top: 2px; }
.m-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 4px;
}
.m-k { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 2px; }
.m-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.m-card-actions button { font-size: 13px; cursor: pointer; }
body.emp-mode .m-form-grid > div { flex: 1 1 100% !important; min-width: 0 !important; }
body.emp-mode .m-form-grid input,
body.emp-mode .m-form-grid select {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 42px;
  font-size: 15px !important;
}
body.emp-mode #page-content select {
  max-width: 100%;
  min-height: 42px;
  font-size: 15px;
}
body.emp-mode .table-toolbar { gap: 8px; }
body.emp-mode .table-toolbar button { flex: 1 1 auto; }


/* Приоритеты кофеен — мобилка */
body.emp-mode .prio-editor h3 { font-size: 16px; }
body.emp-mode .prio-editor select,
body.emp-mode .prio-editor button {
  font-size: 15px !important;
  min-height: 42px;
}
body.emp-mode .prio-editor [style*="display:flex"][style*="gap:8px"] {
  flex-wrap: wrap !important;
  width: 100%;
}
body.emp-mode .prio-editor select {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
body.emp-mode .prio-check-grid label {
  flex: 1 1 calc(50% - 8px);
  min-width: 140px;
  box-sizing: border-box;
}
body.emp-mode .prio-order-table td {
  font-size: 13px;
  padding: 10px 8px !important;
}
body.emp-mode .prio-order-table button {
  min-height: 36px;
  min-width: 36px;
  padding: 6px 10px !important;
}
body.emp-mode .m-card .m-k { margin-bottom: 2px; }


/* ===== Кандидаты / собеседования (мобилка) ===== */
.cand-page { display: grid; gap: 12px; color: #0f172a; }
.cand-card, .cand-list-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}
.cand-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.cand-hint { margin: 0 0 14px; font-size: 13px; color: #64748b; line-height: 1.4; }
.cand-toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.cand-toolbar .cand-field { flex: 1 1 160px; }
.cand-field { display: flex; flex-direction: column; gap: 4px; }
.cand-field label { font-size: 12px; color: #64748b; font-weight: 600; }
.cand-field input, .cand-field select {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
}
.cand-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.cand-field-full { grid-column: 1 / -1; }
.cand-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  min-height: 44px;
}
.cand-btn-yellow { background: #facc15; color: #0f172a; }
.cand-btn-dark { background: #0f172a; color: #fff; }
.cand-btn-block { width: 100%; grid-column: 1 / -1; }
.cand-add-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
}
.cand-add-box summary {
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}
.cand-add-box summary::-webkit-details-marker { display: none; }

.cand-cards { display: grid; gap: 10px; }
.cand-item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.cand-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.cand-item-name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.cand-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.cand-st-pending { background: #ffedd5; color: #c2410c; }
.cand-st-hired { background: #dcfce7; color: #166534; }
.cand-st-rejected { background: #f1f5f9; color: #64748b; }
.cand-item-rows { display: grid; gap: 6px; }
.cand-item-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.cand-item-row span { color: #94a3b8; }
.cand-item-row b { font-weight: 700; text-align: right; }
.cand-item-row a { color: #0284c7; text-decoration: none; }
.cand-item-note {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
}
.cand-item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.cand-action-hire {
  background: #dcfce7; border: 1px solid #86efac; color: #166534;
  border-radius: 10px; padding: 12px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.cand-action-reject {
  background: #f8fafc; border: 1px solid #e2e8f0; color: #475569;
  border-radius: 10px; padding: 12px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.cand-action-del {
  grid-column: 1 / -1;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: 10px; padding: 12px; font-weight: 600; font-size: 14px; cursor: pointer;
}

@media (min-width: 900px) {
  .cand-form { grid-template-columns: repeat(3, 1fr); }
}


/* Перевод в должности */
.pos-page { display: grid; gap: 12px; color: #0f172a; }
.pos-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}
.pos-title { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.pos-hint { margin: 0 0 12px; font-size: 13px; color: #64748b; line-height: 1.4; }
.pos-form { display: grid; gap: 10px; }
.pos-form-grid { grid-template-columns: 1fr 1fr; }
.pos-field { display: flex; flex-direction: column; gap: 4px; }
.pos-field-full { grid-column: 1 / -1; }
.pos-field label { font-size: 12px; color: #64748b; font-weight: 600; }
.pos-field input, .pos-field select {
  width: 100%; box-sizing: border-box; min-height: 44px;
  padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 15px;
}
.pos-btn {
  border: none; border-radius: 10px; padding: 12px 14px;
  font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px;
}
.pos-btn-dark { background: #0f172a; color: #fff; }
.pos-btn-green { background: #059669; color: #fff; }
.pos-btn-ghost { background: #fff; border: 1px solid #e2e8f0; color: #0f172a; }
.pos-btn-block { width: 100%; grid-column: 1 / -1; }
.pos-status { font-size: 13px; color: #64748b; }
.pos-hist-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
body.emp-mode .pos-form-grid { grid-template-columns: 1fr; }


/* Чек-лист руководителя — таблица управляющих на мобилке */
.emp-checklist table th,
.emp-checklist table td {
  -webkit-text-size-adjust: 100%;
}
body.emp-mode .emp-checklist {
  overflow-x: hidden;
}


/* Перемещения — приёмка */
.td-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px 12px;
  scrollbar-width: none;
}
.td-tabs::-webkit-scrollbar { display: none; }
.td-tab {
  flex: 0 0 auto;
  border: 1px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}
.td-tab.on {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.td-empty {
  text-align: center;
  color: #94a3b8;
  padding: 28px 12px;
  background: #1e293b;
  border-radius: 16px;
}
.td-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.td-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.td-no {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.25;
  word-break: break-word;
}
.td-pill {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #334155;
  color: #e2e8f0;
  white-space: nowrap;
}
.td-pill.wait { background: #1e3a5f; color: #93c5fd; }
.td-pill.bad { background: #3f1d1d; color: #fca5a5; }
.td-pill.ok, .td-pill.ok2 { background: #14532d; color: #86efac; }
.td-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.td-wh {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.td-arrow { color: #64748b; font-weight: 800; }
.td-meta { font-size: 12px; color: #94a3b8; margin-bottom: 10px; }
.td-hint { font-size: 12px; color: #93c5fd; margin: 0 0 10px; line-height: 1.35; }
.td-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.td-actions-col { flex-direction: column; margin-top: 12px; }
.td-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  min-height: 44px;
}
.td-btn-main { background: #4f46e5; color: #fff; width: 100%; }
.td-btn-ok { background: #166534; color: #fff; }
.td-ok-mark { color: #86efac; font-size: 12px; font-weight: 700; align-self: center; }
.td-back {
  border: 0;
  background: transparent;
  color: #93c5fd;
  font-weight: 700;
  padding: 0 0 10px;
  font-size: 14px;
}
.td-lines { display: grid; gap: 8px; }
.td-line {
  display: grid;
  grid-template-columns: 22px 1fr 72px;
  gap: 8px;
  align-items: center;
  background: #0f172a;
  border-radius: 12px;
  padding: 10px;
}
.td-line-bad { outline: 1px solid #f87171; }
.td-line-n { color: #64748b; font-size: 12px; font-weight: 700; }
.td-line-name {
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.td-life { font-size: 11px; color: #94a3b8; font-weight: 600; display: block; }
.td-norm-btn {
  margin-top: 6px;
  border: none;
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-block;
}
.emp-wa-wrap { padding: 0 10px 16px; max-width: 100%; box-sizing: border-box; }
.emp-wa-wrap select {
  width: 100%; max-width: 100%;
  padding: 10px; border: 1px solid #475569; border-radius: 12px;
  font-weight: 700; margin-bottom: 10px; box-sizing: border-box;
  background: #0f172a; color: #fff;
}
.emp-wa-item {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.emp-wa-warn { border-color: #f59e0b; background: #3b2f12; }
.emp-wa-name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
  color: #fff;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin-bottom: 6px;
}
.emp-wa-norm {
  display: inline-block;
  border: none;
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.emp-wa-meta {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 8px;
  line-height: 1.35;
}
.emp-wa-row {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 8px;
  align-items: center;
}
.emp-wa-plus { font-size: 12px; color: #e2e8f0; }
.emp-wa-batch {
  width: 72px; max-width: 100%;
  padding: 8px;
  border: 1px solid #475569;
  border-radius: 10px;
  font-weight: 800;
  background: #0f172a;
  color: #fff;
  box-sizing: border-box;
}
.emp-wa-one {
  min-width: 0;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  background: #059669;
  color: #fff;
  font-weight: 800;
}
.emp-wa-all {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  box-sizing: border-box;
}
.td-norm-ov {
  position: fixed; inset: 0; z-index: 220000;
  background: rgba(15,23,42,.72);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 12px;
}
.td-norm-card {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 18px 18px 12px 12px;
  padding: 14px;
}
.td-norm-close {
  width: 100%; margin-bottom: 10px;
  border: none; border-radius: 12px;
  background: #334155; color: #fff; font-weight: 800;
  padding: 12px; cursor: pointer;
}
.td-norm-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; overflow-wrap: anywhere; word-break: break-word; color: #fff; }
.td-norm-life { font-size: 13px; color: #7dd3fc; margin-bottom: 10px; }
.td-norm-img { width: 100%; max-width: 100%; height: auto; border-radius: 12px; margin: 0 0 10px; display: block; background: #1e293b; }
.td-norm-text { font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; color: #f1f5f9; max-width: 100%; }
.td-qty {
  width: 72px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}
.td-qty-read { font-size: 12px; color: #cbd5e1; text-align: right; }
.td-qty-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.td-qty-pair label { display: grid; gap: 4px; font-size: 11px; color: #94a3b8; }
.td-qty-pair .td-qty { width: 100%; }
.td-check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
@media (max-width: 420px) {
  .td-line { grid-template-columns: 18px 1fr; }
  .td-line .td-qty, .td-qty-read { grid-column: 2; width: 100%; }
}

.td-toolbar { display:flex; gap:8px; align-items:center; margin:0 0 10px; }
.td-select {
  flex:1; min-width:0; height:40px; border-radius:12px;
  border:1px solid #334155; background:#1e293b; color:#e2e8f0; padding:0 10px;
}
.td-home-card {
  display:block; width:100%; text-align:left;
  background:#1e293b; border:1px solid #334155; border-radius:16px;
  padding:14px; margin-bottom:12px; color:#e2e8f0;
}
.td-home-title { font-weight:800; margin-bottom:8px; }
.td-home-row { display:flex; justify-content:space-between; gap:8px; font-size:13px; color:#cbd5e1; }
.td-home-row b { color:#fff; }


/* Instagram-like photo report */
.pr-ig{margin:-8px -12px 24px;background:#0b0b0d;color:#fff;min-height:70vh;border-radius:0;}
.pr-ig-top{display:flex;align-items:center;gap:8px;padding:10px 12px;position:sticky;top:0;background:#0b0b0d;z-index:3;}
.pr-ig-title{font-weight:800;font-size:18px;flex:1;}
.pr-ig-date{background:#1c1c1f;color:#fff;border:1px solid #333;border-radius:10px;padding:6px 8px;font-size:13px;}
.pr-ig-gear{border:0;background:#1c1c1f;color:#fff;width:36px;height:36px;border-radius:18px;font-size:16px;}
.pr-ig-stories{display:flex;gap:10px;overflow-x:auto;padding:8px 12px 14px;-webkit-overflow-scrolling:touch;}
.pr-ig-stories .pr-sec{flex:0 0 auto;border:1px solid #3f3f46;background:#18181b;color:#fff;border-radius:999px;padding:8px 14px;font-weight:700;}
.pr-ig-stories .pr-sec[style*="rgb(15"],.pr-ig-stories .pr-sec.on{background:#fff;color:#0b0b0d;border-color:#fff;}
.pr-sec-name{font-size:13px;white-space:nowrap;}
.pr-ig-feed{display:flex;flex-direction:column;}
.pr-ig .pr-card{background:#0b0b0d;border:0;border-radius:0;margin:0 0 18px;cursor:pointer;}
.pr-card-head{display:flex;align-items:center;gap:10px;padding:8px 12px;}
.pr-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#ec4899);display:flex;align-items:center;justify-content:center;font-weight:800;}
.pr-cafe{font-weight:800;font-size:14px;}
.pr-sub{font-size:11px;color:#a1a1aa;}
.pr-card-photo{width:100%;background:#111;aspect-ratio:1;overflow:hidden;}
.pr-card-photo img{width:100%;height:100%;object-fit:cover;display:block;}
.pr-card-caption,.pr-card-author{padding:8px 12px 0;font-size:13px;color:#e4e4e7;}
.pr-card-author{color:#a1a1aa;font-size:12px;padding-bottom:8px;}

.pr-miss{margin:8px 12px 28px;padding:14px;background:#18181b;border-radius:16px;border:1px solid #27272a;}
.pr-miss-title{font-weight:800;margin-bottom:8px;}
.pr-miss-ok{color:#86efac;font-size:13px;}
.pr-miss-row{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #27272a;font-size:13px;color:#e4e4e7;}
.pr-miss-row span:first-child{font-weight:700;}
.pr-miss-row span:last-child{color:#a1a1aa;text-align:right;}
.pr-folder{background:#18181b;border:1px solid #27272a;border-radius:12px;margin:8px 0;padding:0 10px 8px;}
.pr-folder summary{list-style:none;cursor:pointer;padding:12px 4px;font-weight:800;display:flex;justify-content:space-between;}
.pr-folder summary small{color:#a1a1aa;font-weight:600;}
.pr-item{display:flex;gap:10px;align-items:flex-start;padding:8px 4px;font-size:14px;}

.pr-cafe-group{margin-bottom:10px;}
.pr-cafe-sticky{position:sticky;top:48px;z-index:2;background:#0b0b0d;padding:10px 12px;font-weight:800;font-size:16px;border-bottom:1px solid #27272a;}

.td-people,.td-people-mini{font-size:12px;color:#475569;margin:6px 0 8px;}
.td-people-mini{margin:4px 0 0;}

.sb-wrap{padding:8px 4px 24px;}
.sb-top{display:flex;gap:10px;align-items:flex-end;margin-bottom:12px;flex-wrap:wrap;}
.sb-title{font-weight:800;font-size:20px;}
.sb-sub{font-size:12px;color:#64748b;}
.sb-search{flex:1;min-width:160px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;}
.sb-list{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;}
.sb-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;text-align:left;padding:12px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;}
.sb-name{font-weight:700;}
.sb-meta{font-size:12px;color:#94a3b8;}
.sb-bal{font-weight:800;}
.sb-bal.neg,.neg{color:#b91c1c;}
.sb-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:14px;}
.sb-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
.sb-actions input,.sb-actions button{padding:8px 10px;border-radius:10px;border:1px solid #e2e8f0;}
.sb-actions button{background:#0f172a;color:#fff;border:0;font-weight:700;}
.sb-cols{display:grid;grid-template-columns:1fr;gap:12px;}
@media(min-width:800px){.sb-cols{grid-template-columns:1.2fr .8fr;}}
.sb-h{font-weight:800;margin-bottom:6px;}
.sb-line{display:grid;grid-template-columns:90px 1fr auto;gap:8px;font-size:13px;padding:6px 0;border-bottom:1px solid #f1f5f9;}
.sb-empty{color:#94a3b8;padding:10px;}

.sb-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0;}
.sb-tile{text-align:left;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:14px;}
.sb-tile-i{font-size:22px;}
.sb-tile-t{font-weight:800;margin-top:6px;}
.sb-tile-s{font-size:12px;color:#64748b;}
.sb-panel{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px;}
.sb-form{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;}
.sb-form input,.sb-form button{padding:10px;border-radius:10px;border:1px solid #e2e8f0;}
.sb-form button{background:#0f172a;color:#fff;border:0;font-weight:700;}
.sb-sum{font-size:14px;margin:8px 0 12px;}

.sb-wrap,.sb-panel,.sb-card,.sb-line,.sb-h,.sb-sum,.sb-name,.sb-title{color:#0f172a;}
.sb-line{color:#0f172a;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px;margin:6px 0;display:grid;grid-template-columns:84px 1fr auto auto;gap:8px;align-items:start;}
.sb-line span,.sb-line b{color:#0f172a;}
.sb-line .neg{color:#b91c1c;}
.sb-cancelled{opacity:.75;background:#f1f5f9;}
.sb-cancelled span{text-decoration:line-through;}
.sb-x{border:0;background:#fee2e2;color:#991b1b;border-radius:8px;padding:6px 8px;font-weight:700;}
.sb-empty{color:#334155;}
.sb-sub{color:#334155;}

.sb-del{border:0;background:#0f172a;color:#fff;border-radius:8px;padding:6px 8px;font-weight:700;}

/* rel-mobile-single-update: updater lives only in the main mobile menu */
body.emp-mode #og-update-check, body.emp-mode #pwa-menu-install { display:none !important; }
