/* v89: Header theme control — seamless multi-axis 3D cube with hover-only sun/moon. */
.theme-toggle{
  --lumen-cube-size:22px;
  --lumen-cube-half:11px;
  position:relative;
  display:grid;
  place-items:center;
  overflow:visible;
  touch-action:manipulation;
}
.theme-toggle[data-switch-locked="true"]{cursor:wait}
.brand:hover .theme-toggle{transform:none!important;filter:none!important}
.lumen-cube-scene{
  position:relative;
  display:block;
  width:30px;
  height:30px;
  perspective:92px;
  perspective-origin:50% 50%;
  pointer-events:none;
  transform:translateZ(0);
  animation:lumenCubeFloat 3.2s ease-in-out infinite;
}
.lumen-cube{
  position:absolute;
  left:50%;
  top:50%;
  width:var(--lumen-cube-size);
  height:var(--lumen-cube-size);
  margin:calc(var(--lumen-cube-size) / -2) 0 0 calc(var(--lumen-cube-size) / -2);
  transform-style:preserve-3d;
  will-change:transform;
  animation:lumenCubeRotate 6.4s linear infinite;
}
.lumen-cube-face{
  position:absolute;
  inset:0;
  display:block;
  border:1px solid rgba(102,84,222,.72);
  background:linear-gradient(145deg,rgba(255,255,255,.20),rgba(111,89,224,.055));
  box-shadow:inset 0 0 8px rgba(116,91,229,.08),0 0 5px rgba(109,85,226,.11);
  backface-visibility:visible;
  transition:border-color .28s ease,background .28s ease,box-shadow .28s ease,opacity .28s ease;
}
.lumen-cube-face-front{transform:rotateY(0deg) translateZ(var(--lumen-cube-half))}
.lumen-cube-face-back{transform:rotateY(180deg) translateZ(var(--lumen-cube-half))}
.lumen-cube-face-right{transform:rotateY(90deg) translateZ(var(--lumen-cube-half))}
.lumen-cube-face-left{transform:rotateY(-90deg) translateZ(var(--lumen-cube-half))}
.lumen-cube-face-top{transform:rotateX(90deg) translateZ(var(--lumen-cube-half))}
.lumen-cube-face-bottom{transform:rotateX(-90deg) translateZ(var(--lumen-cube-half))}
.lumen-cube-core{
  position:absolute;
  left:50%;
  top:50%;
  z-index:1;
  width:11px;
  height:11px;
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.lumen-celestial{
  position:absolute;
  inset:0;
  display:block;
  border-radius:50%;
  opacity:0;
  transform:scale(.3);
  transition:opacity .22s ease,transform .3s cubic-bezier(.2,.8,.2,1),filter .3s ease;
}
.lumen-celestial-moon{
  background:
    radial-gradient(circle at 31% 31%,rgba(190,181,238,.20) 0 8%,transparent 10%),
    radial-gradient(circle at 69% 59%,rgba(7,7,20,.58) 0 12%,transparent 14%),
    radial-gradient(circle at 43% 76%,rgba(4,4,14,.46) 0 9%,transparent 11%),
    radial-gradient(circle at 37% 29%,#5a527d 0,#302c53 34%,#17162d 66%,#090912 100%);
  box-shadow:
    0 0 0 1px rgba(30,27,55,.30),
    0 0 6px 2px rgba(38,31,75,.48),
    0 0 14px 5px rgba(74,54,148,.22);
  filter:drop-shadow(0 0 2px rgba(14,12,31,.72));
}
.lumen-celestial-moon::before{
  content:"";
  position:absolute;
  inset:-6px;
  z-index:-1;
  border-radius:50%;
  background:radial-gradient(circle,rgba(27,22,58,.36) 0,rgba(58,43,116,.18) 38%,transparent 72%);
  filter:blur(1.5px);
}
.lumen-celestial-sun{
  background:radial-gradient(circle at 38% 34%,#fff8c9 0 10%,#ffe27c 30%,#ffbd42 67%,#ff9138 100%);
  box-shadow:0 0 5px 2px rgba(255,193,69,.62),0 0 13px 4px rgba(255,156,54,.28);
}
.lumen-celestial-sun::before{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:50%;
  background:repeating-conic-gradient(from 7deg,rgba(255,190,76,.56) 0deg 7deg,transparent 7deg 24deg);
  -webkit-mask:radial-gradient(circle,transparent 0 52%,#000 56% 100%);
  mask:radial-gradient(circle,transparent 0 52%,#000 56% 100%);
  opacity:.72;
}
@media(hover:hover) and (pointer:fine){
  .theme-toggle:hover .lumen-celestial-moon{
    opacity:1;
    transform:scale(1);
  }
  .theme-toggle:hover .lumen-celestial-sun{opacity:0;transform:scale(.3)}
  html[data-theme="dark"] .theme-toggle:hover .lumen-celestial-moon{opacity:0;transform:scale(.3)}
  html[data-theme="dark"] .theme-toggle:hover .lumen-celestial-sun{
    opacity:1;
    transform:scale(1);
  }
}
.theme-toggle.is-switching .lumen-cube-scene{animation:lumenCubeSwitchPulse 3s cubic-bezier(.22,.68,.18,1)}
.theme-toggle.is-switching .lumen-cube-face{animation:lumenCubeFaceSwitch 3s ease}
html[data-theme="dark"] .lumen-cube-face{
  border-color:rgba(165,126,255,.75);
  background:linear-gradient(145deg,rgba(157,112,255,.10),rgba(36,25,78,.14));
  box-shadow:inset 0 0 8px rgba(160,114,255,.10),0 0 6px rgba(142,92,255,.13);
}
@keyframes lumenCubeRotate{
  0%{transform:rotateX(-32deg) rotateY(0deg) rotateZ(0deg)}
  12.5%{transform:rotateX(13deg) rotateY(45deg) rotateZ(6deg)}
  25%{transform:rotateX(58deg) rotateY(90deg) rotateZ(10deg)}
  37.5%{transform:rotateX(103deg) rotateY(135deg) rotateZ(6deg)}
  50%{transform:rotateX(148deg) rotateY(180deg) rotateZ(0deg)}
  62.5%{transform:rotateX(193deg) rotateY(225deg) rotateZ(-6deg)}
  75%{transform:rotateX(238deg) rotateY(270deg) rotateZ(-10deg)}
  87.5%{transform:rotateX(283deg) rotateY(315deg) rotateZ(-6deg)}
  100%{transform:rotateX(328deg) rotateY(360deg) rotateZ(0deg)}
}
@keyframes lumenCubeFloat{
  0%,100%{transform:translateY(0) scale(1)}
  50%{transform:translateY(-1px) scale(1.035)}
}
@keyframes lumenCubeSwitchPulse{
  0%{transform:scale(1);filter:brightness(1)}
  12%{transform:scale(.88);filter:brightness(1.35)}
  28%{transform:scale(1.12);filter:brightness(1.12)}
  48%{transform:scale(.97);filter:brightness(1.04)}
  72%{transform:scale(1.04);filter:brightness(1.02)}
  100%{transform:scale(1);filter:brightness(1)}
}
@keyframes lumenCubeFaceSwitch{
  0%,100%{opacity:1}
  12%{opacity:.58}
  30%{opacity:1}
  48%{opacity:.74}
  70%{opacity:1}
}
@media(max-width:560px){
  .theme-toggle{--lumen-cube-size:20px;--lumen-cube-half:10px}
  .lumen-cube-scene{width:27px;height:27px;perspective:84px}
  .lumen-cube-core{width:10px;height:10px}
}
@media(prefers-reduced-motion:reduce){
  .lumen-cube{animation:none!important;transform:rotateX(-32deg) rotateY(32deg) rotateZ(4deg)}
  .lumen-cube-scene{animation:none!important}
  .theme-toggle.is-switching .lumen-cube-scene,.theme-toggle.is-switching .lumen-cube-face{animation:none!important}
}

/* v90: Lumen-native pagination and progressive loading. */
.lumen-pagination{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:minmax(110px,1fr) auto minmax(150px,1fr);
  align-items:center;
  gap:12px;
  min-height:44px;
  margin-top:8px;
  padding:9px 2px 0;
  border-top:1px solid var(--lumen-line,rgba(82,87,120,.12));
}
.lumen-pagination[hidden],.lumen-load-more[hidden]{display:none!important}
.lumen-pagination-summary{
  color:#9294a1;
  font-size:10px;
  font-weight:560;
  white-space:nowrap;
}
.lumen-pagination-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:0;
}
.lumen-page-button,
.lumen-page-button:hover,
.lumen-page-button:focus-visible,
.lumen-page-button:active{
  appearance:none;
  display:grid;
  place-items:center;
  flex:0 0 30px;
  width:30px;
  min-width:30px;
  height:30px;
  margin:0;
  padding:0;
  border:1px solid rgba(72,76,103,.14)!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.58)!important;
  color:#717482;
  font:650 10px/1 Inter,"Segoe UI",ui-sans-serif,system-ui,sans-serif;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
}
.lumen-page-button{cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease}
.lumen-page-button:hover,.lumen-page-button:focus-visible{
  border-color:rgba(110,95,231,.25)!important;
  background:rgba(110,95,231,.075)!important;
  color:#6255d3;
  outline:none;
}
.lumen-page-button:focus-visible{box-shadow:0 0 0 2px rgba(110,95,231,.09)!important}
.lumen-page-button.active,
.lumen-page-button.active:hover,
.lumen-page-button.active:focus-visible{
  border-color:rgba(110,95,231,.24)!important;
  background:var(--lumen-purple-soft,#eeeaff)!important;
  color:var(--lumen-purple,#6e5fe7);
  font-weight:760;
}
.lumen-page-button:disabled{
  border-color:rgba(72,76,103,.08)!important;
  background:rgba(255,255,255,.28)!important;
  color:#b7b9c2;
  cursor:default;
  opacity:.62;
}
.lumen-page-arrow svg{
  width:14px;
  height:14px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.lumen-page-ellipsis{
  display:grid;
  place-items:center;
  width:18px;
  height:30px;
  color:#a0a2ae;
  font-size:12px;
  user-select:none;
}
.lumen-page-size{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  min-width:0;
  margin:0;
  color:#9294a1;
  font-size:10px;
  font-weight:560;
  white-space:nowrap;
}
.lumen-page-size select{
  appearance:none;
  width:58px;
  height:30px;
  margin:0;
  padding:0 22px 0 9px;
  border:1px solid rgba(72,76,103,.14);
  border-radius:8px;
  background:
    linear-gradient(45deg,transparent 50%,#8f919e 50%) calc(100% - 12px) 12px/4px 4px no-repeat,
    linear-gradient(135deg,#8f919e 50%,transparent 50%) calc(100% - 8px) 12px/4px 4px no-repeat,
    rgba(255,255,255,.58);
  color:#656875;
  font:650 10px/1 Inter,"Segoe UI",ui-sans-serif,system-ui,sans-serif;
  outline:none;
  box-shadow:none;
}
.lumen-page-size select:hover{border-color:rgba(110,95,231,.24);background-color:rgba(110,95,231,.045)}
.lumen-page-size select:focus{border-color:rgba(110,95,231,.38);box-shadow:0 0 0 2px rgba(110,95,231,.08)}
.lumen-load-more{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:42px;
  margin-top:8px;
  padding:9px 2px 0;
  border-top:1px solid var(--lumen-line,rgba(82,87,120,.12));
}
.lumen-load-more button,
.lumen-load-more button:hover,
.lumen-load-more button:focus-visible,
.lumen-load-more button:active{
  min-height:32px;
  margin:0;
  padding:7px 13px;
  border:1px solid rgba(110,95,231,.15)!important;
  border-radius:9px!important;
  background:rgba(110,95,231,.065)!important;
  color:#6558d8;
  font-size:10px;
  font-weight:690;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
}
.lumen-load-more button{cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease}
.lumen-load-more button:hover,.lumen-load-more button:focus-visible{
  border-color:rgba(110,95,231,.27)!important;
  background:rgba(110,95,231,.105)!important;
  color:#584ac9;
  outline:none;
}
.lumen-load-more span{color:#a0a2ae;font-size:9px;font-weight:560;white-space:nowrap}
.chat-history-loader{
  display:flex;
  justify-content:center;
  margin:0 0 7px;
  padding:5px 0 3px;
  color:inherit;
  font-size:inherit;
  text-align:center;
}
.chat-history-loader span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 10px;
  border:1px solid rgba(72,76,103,.10);
  border-radius:999px;
  background:rgba(255,255,255,.48);
  color:#9294a1;
  font-size:9px;
  font-weight:560;
  box-shadow:0 3px 10px rgba(71,72,102,.035);
}
html[data-theme="dark"] .lumen-pagination,
html[data-theme="dark"] .lumen-load-more{border-top-color:rgba(176,145,255,.10)}
html[data-theme="dark"] .lumen-pagination-summary,
html[data-theme="dark"] .lumen-page-size{color:#858092}
html[data-theme="dark"] .lumen-page-button,
html[data-theme="dark"] .lumen-page-button:hover,
html[data-theme="dark"] .lumen-page-button:focus-visible,
html[data-theme="dark"] .lumen-page-button:active{
  border-color:rgba(176,145,255,.12)!important;
  background:rgba(20,18,50,.72)!important;
  color:#9c97a8;
}
html[data-theme="dark"] .lumen-page-button:hover,
html[data-theme="dark"] .lumen-page-button:focus-visible{
  border-color:rgba(185,150,255,.24)!important;
  background:rgba(139,92,246,.095)!important;
  color:#c6aaff;
}
html[data-theme="dark"] .lumen-page-button.active,
html[data-theme="dark"] .lumen-page-button.active:hover,
html[data-theme="dark"] .lumen-page-button.active:focus-visible{
  border-color:rgba(185,150,255,.24)!important;
  background:#1b1645!important;
  color:#b996ff;
}
html[data-theme="dark"] .lumen-page-button:disabled{
  border-color:rgba(176,145,255,.06)!important;
  background:rgba(16,14,42,.45)!important;
  color:#5e596b;
}
html[data-theme="dark"] .lumen-page-ellipsis{color:#6f6a7c}
html[data-theme="dark"] .lumen-page-size select{
  border-color:rgba(176,145,255,.12);
  background:
    linear-gradient(45deg,transparent 50%,#807a8f 50%) calc(100% - 12px) 12px/4px 4px no-repeat,
    linear-gradient(135deg,#807a8f 50%,transparent 50%) calc(100% - 8px) 12px/4px 4px no-repeat,
    rgba(20,18,50,.72);
  color:#b6b0c0;
}
html[data-theme="dark"] .lumen-page-size select:hover{border-color:rgba(185,150,255,.22);background-color:rgba(139,92,246,.08)}
html[data-theme="dark"] .lumen-page-size select:focus{border-color:rgba(185,150,255,.34);box-shadow:0 0 0 2px rgba(139,92,246,.08)}
html[data-theme="dark"] .lumen-load-more button,
html[data-theme="dark"] .lumen-load-more button:hover,
html[data-theme="dark"] .lumen-load-more button:focus-visible,
html[data-theme="dark"] .lumen-load-more button:active{
  border-color:rgba(185,150,255,.14)!important;
  background:rgba(139,92,246,.085)!important;
  color:#b99cff;
}
html[data-theme="dark"] .lumen-load-more button:hover,
html[data-theme="dark"] .lumen-load-more button:focus-visible{border-color:rgba(185,150,255,.25)!important;background:rgba(139,92,246,.13)!important;color:#c8b1ff}
html[data-theme="dark"] .lumen-load-more span{color:#777284}
html[data-theme="dark"] .chat-history-loader span{
  border-color:rgba(176,145,255,.08);
  background:rgba(20,18,50,.62);
  color:#7f798d;
  box-shadow:none;
}
@media(max-width:700px){
  .lumen-pagination{
    grid-template-columns:minmax(0,1fr) auto;
    gap:7px 9px;
    min-height:72px;
    margin-top:6px;
    padding-top:8px;
  }
  .lumen-pagination-nav{
    grid-column:1/-1;
    grid-row:2;
    justify-content:flex-start;
    overflow-x:auto;
    padding-bottom:1px;
    scrollbar-width:none;
  }
  .lumen-pagination-nav::-webkit-scrollbar{display:none}
  .lumen-page-button,.lumen-page-button:hover,.lumen-page-button:focus-visible,.lumen-page-button:active{flex-basis:28px;width:28px;min-width:28px;height:28px;border-radius:8px!important;font-size:9px}
  .lumen-page-arrow svg{width:13px;height:13px}
  .lumen-page-ellipsis{height:28px}
  .lumen-page-size{gap:6px;font-size:9px}
  .lumen-page-size select{width:54px;height:28px;padding-left:8px;font-size:9px;background-position:calc(100% - 11px) 11px,calc(100% - 7px) 11px,0 0}
  .lumen-load-more{min-height:39px;margin-top:6px;padding-top:7px}
  .lumen-load-more button,.lumen-load-more button:hover,.lumen-load-more button:focus-visible,.lumen-load-more button:active{min-height:30px;padding:6px 11px;font-size:9px}
}
@media(max-width:420px){
  .lumen-page-size>span{display:none}
  .lumen-pagination-summary{font-size:9px}
}

/* Карточка сотрудника: состояние привязки Telegram и сброс администратором. */
.employee-telegram-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:9px 12px;border:1px solid var(--lumen-line);border-radius:10px}
.employee-telegram-row>span{color:var(--lumen-muted);font-size:12px}
.employee-telegram-row b{color:var(--lumen-text);font-weight:700}
.employee-telegram-row button{padding:8px 12px;font-size:12px}
.telegram-reset-dialog{width:min(460px,calc(100% - 24px))}
.telegram-reset-dialog p{margin:0;font-size:12px;line-height:1.45}
.telegram-reset-dialog textarea{font:inherit;resize:vertical}

/* Экраны входа: тот же 3D-куб, что в шапке (крупнее, без солнца/луны и без нажатия), вместо картинки. */
.telegram-gate .gate-brand-mark{--lumen-cube-size:36px;--lumen-cube-half:18px}
.telegram-gate .gate-brand-mark .lumen-cube-scene{width:54px;height:54px;perspective:150px}
.telegram-gate .gate-brand-mark .lumen-cube-face{border-width:1.5px}
@media(max-width:560px){
  .telegram-gate .gate-brand-mark{--lumen-cube-size:32px;--lumen-cube-half:16px}
  .telegram-gate .gate-brand-mark .lumen-cube-scene{width:48px;height:48px;perspective:134px}
}

