:root { color-scheme: light; --brand:#6E8BFF; --bg:#F7F7FC; --card:#fff; --tx:#3E4152; --tx2:#6B6F80; --tx3:#9BA0B0; --line:#ECECF4; --lav:#E8EBFF; --mint:#E2F5E9; --peach:#FFEBDC; --sky:#E1F0FB; --butter:#FDF3D8; --lilac:#F0E7FA; --rose:#FDE7EE; }
  * { box-sizing: border-box; }
  body { font-family: Inter, -apple-system, system-ui, sans-serif; margin: 0; display: flex; height: 100vh; background: var(--bg); color: var(--tx); padding: 12px; gap: 12px; }
  #side { width: 340px; background: var(--card); border-radius: 18px; box-shadow: 0 1px 2px rgba(110,139,255,.06), 0 12px 32px rgba(110,139,255,.08); padding: 16px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
  #main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--card); border-radius: 18px; box-shadow: 0 1px 2px rgba(110,139,255,.06), 0 12px 32px rgba(110,139,255,.08); overflow: hidden; }
  #side, #main { display: none; }
  body.chatmode #side, body.chatmode #main { display: flex; }
  #gate { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(1100px 520px at 50% -12%, #EDEFFC, var(--bg) 65%); z-index: 40; }
  body.chatmode #gate { display: none; }
  #gatecard { width: 400px; max-width: calc(100vw - 32px); background: var(--card); border-radius: 18px; box-shadow: 0 1px 2px rgba(110,139,255,.08), 0 24px 64px rgba(110,139,255,.16); padding: 26px 26px 16px; display: flex; flex-direction: column; gap: 8px; }
  #brand { text-align: center; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
  #brand .bolt { color: var(--brand); }
  .tagline { text-align: center; color: var(--tx3); font-size: 12px; margin: -2px 0 8px; }
  #feed { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
  .msg { max-width: 70%; padding: 9px 13px; border-radius: 18px; background: var(--card); box-shadow: 0 1px 2px rgba(110,139,255,.06), 0 6px 16px rgba(110,139,255,.06); align-self: flex-start; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.45; position: relative; }
  .acts { position: absolute; top: -11px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
  .msg:hover .acts { opacity: 1; }
  .acts button { padding: 2px 8px; font-size: 11px; border-radius: 8px; background: #fff; color: var(--tx2); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(110,139,255,.10); }
  .acts button:hover { background: var(--lav); color: #4059B8; }
  .quote { display: block; font-size: 11.5px; color: var(--tx2); border-left: 2px solid var(--lav); padding: 1px 0 1px 7px; margin-bottom: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .msg.me { background: #DDE6FF; color: #33509E; align-self: flex-end; }
  .msg small { display: block; opacity: .55; font-size: 11px; color: var(--tx2); }
  .msg.lock { opacity: .5; font-style: italic; }
  input, button { padding: 8px 12px; font: inherit; border-radius: 10px; }
  input { border: 1px solid var(--line); background: #FBFBFE; color: var(--tx); }
  button { background: var(--brand); color: #fff; border: 0; font-weight: 600; cursor: pointer; }
  #bar { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--card); }
  #replybar { display: none; align-items: center; gap: 8px; padding: 7px 16px; font-size: 12px; color: var(--tx2); background: var(--lav); }
  #replybar.show { display: flex; }
  #replybar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #replyx { padding: 2px 8px; font-size: 11px; margin-left: auto; background: #fff; color: var(--tx2); border: 1px solid var(--line); }
  #bar input { flex: 1; border-radius: 18px; }
  .chat { padding: 8px 10px; border-radius: 12px; cursor: pointer; font-size: 13.5px; }
  .chat:hover { background: #F2F4FB; }
  .chat.on { background: var(--lav); color: #4059B8; font-weight: 600; }
  #status { font-size: 12px; color: var(--tx2); }
  .warn { font-size: 12px; color: #B04A70; }
  .ok { font-size: 12px; color: #2F7F52; }
  .sec { display: flex; gap: 6px; align-items: center; }
  .sec input { flex: 1; }
  h4 { margin: 10px 0 2px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tx3); font-weight: 700; }
  #chead { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; text-align: center; }
  #gtasks-h { display: none; }
  #gtasks .taskrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
  #gtasks .taskrow:hover { background: #F0F1F8; }
  #gtasks .taskrow.urg .tmain b { color: #C0453E; }
  #gtasks .tmain { flex: 1; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
  #gtasks .tmeta { color: var(--tx3); font-size: 11px; margin-top: 2px; }
  #gtasks .tmenu { display: none; gap: 2px; flex-shrink: 0; }
  #gtasks .taskrow:hover .tmenu { display: flex; }
  #gtasks .tmenu button { border: 0; background: transparent; cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 6px; }
  #gtasks .tmenu button:hover { background: #E2E5F5; }
  #gtasks .tedit { width: 100%; font-size: 13px; }
  #gtasks .tnone { color: var(--tx3); font-size: 12px; padding: 4px 8px; }
#taskbar { padding: 10px 16px; border-bottom: 1px solid var(--line); background: #FBFBFE; }
#tasklist .tk { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; }
#tasklist .tk .ttl { flex: 1; }
#tasklist .tk.done .ttl { text-decoration: line-through; color: #9A9AA5; }
#tasklist .tk .who { color: #6B6B76; font-size: 12px; }
#tasklist .tk .due { font-size: 12px; color: #2F7F52; }
#tasklist .tk .due.over { color: #C0453E; font-weight: 600; }
#tasklist .tk .del { cursor: pointer; color: #C2C2CC; font-size: 12px; }
#taskadd { display: flex; gap: 6px; margin-top: 8px; }
#taskadd input, #taskadd select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px; background: #fff; }
#taskadd input#tasktitle { flex: 1; }
#taskadd button { border: none; border-radius: 8px; padding: 5px 14px; background: #E8EBFF; color: #3D5AFE; font-weight: 600; cursor: pointer; }
  h3 { margin: 0 0 6px; letter-spacing: -.01em; font-size: 20px; }
  hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
  #loginbox { display: flex; flex-direction: column; gap: 8px; }
  #me { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  #offhead { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; padding: 7px 9px; margin-left: -9px; border-radius: 12px; cursor: pointer; transition: background .15s; }
  #offhead:hover { background: #ECECF6; }
  #offhead.on { background: #E4EAFF; box-shadow: inset 0 0 0 1px rgba(61,90,254,.25); }
  #offhead .offtitle b { font-size: 16px; letter-spacing: -.01em; }
  #offhead .offtitle small { display: block; color: var(--tx3); font-size: 11px; }
  .grouph { margin: 12px 0 3px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tx3); font-weight: 700; }
  .prow { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 12px; cursor: pointer; font-size: 13.5px; }
  .prow:hover { background: #F2F4FB; }
  /* индикаторы состояния: стальные шарики с бликом и тенью (решение владельца 05.11.2026) */
  .dot{width:11px;height:11px;border-radius:50%;flex:none;
    background:
      radial-gradient(circle at 32% 27%, rgba(255,255,255,.95) 0 10%, rgba(255,255,255,.38) 11% 24%, rgba(255,255,255,0) 44%),
      radial-gradient(circle at 50% 118%, rgba(0,0,0,.42), rgba(0,0,0,0) 58%),
      linear-gradient(158deg,#e6e9ef 0%,#b3bac6 42%,#8b93a1 66%,#cdd3dc 100%);
    box-shadow:
      inset 0 1px 1px rgba(255,255,255,.75),
      inset 0 -1px 2px rgba(0,0,0,.28),
      0 1px 2px rgba(20,22,29,.38),
      0 3px 7px rgba(20,22,29,.16);}
  .dot.on{width:11px;height:11px;
    background:
      radial-gradient(circle at 32% 27%, rgba(255,255,255,.95) 0 10%, rgba(255,255,255,.34) 11% 24%, rgba(255,255,255,0) 44%),
      radial-gradient(circle at 50% 118%, rgba(6,58,28,.5), rgba(0,0,0,0) 58%),
      linear-gradient(158deg,#a7e8c0 0%,#4cc47c 42%,#219553 68%,#8fe0af 100%);
    box-shadow:
      inset 0 1px 1px rgba(255,255,255,.7),
      inset 0 -1px 2px rgba(0,40,15,.35),
      0 1px 2px rgba(20,22,29,.35),
      0 3px 8px rgba(37,150,83,.35),
      0 0 0 3px rgba(61,190,107,.14);
    animation: breathe 2.8s ease-in-out infinite;}
  .dot.off{width:11px;height:11px;filter:saturate(.5) brightness(.97);
    background:
      radial-gradient(circle at 32% 27%, rgba(255,255,255,.8) 0 9%, rgba(255,255,255,.26) 10% 22%, rgba(255,255,255,0) 42%),
      radial-gradient(circle at 50% 118%, rgba(0,0,0,.35), rgba(0,0,0,0) 58%),
      linear-gradient(158deg,#d6dae2 0%,#a9b0bc 45%,#89909c 70%,#c3c9d3 100%);}
  .dot.busy{width:11px;height:11px;
    background:
      radial-gradient(circle at 32% 27%, rgba(255,255,255,.95) 0 10%, rgba(255,255,255,.34) 11% 24%, rgba(255,255,255,0) 44%),
      radial-gradient(circle at 50% 118%, rgba(70,10,8,.5), rgba(0,0,0,0) 58%),
      linear-gradient(158deg,#f0a49e 0%,#d1564d 42%,#9e2f28 68%,#e79b95 100%);
    box-shadow:
      inset 0 1px 1px rgba(255,255,255,.7),
      inset 0 -1px 2px rgba(60,8,6,.38),
      0 1px 2px rgba(20,22,29,.35),
      0 3px 9px rgba(192,69,62,.4),
      0 0 0 3px rgba(192,69,62,.14);
    animation: pulsered 1.5s ease-in-out infinite;}
  .dot.warn{width:11px;height:11px;
    background:
      radial-gradient(circle at 32% 27%, rgba(255,255,255,.95) 0 10%, rgba(255,255,255,.34) 11% 24%, rgba(255,255,255,0) 44%),
      radial-gradient(circle at 50% 118%, rgba(74,52,6,.5), rgba(0,0,0,0) 58%),
      linear-gradient(158deg,#f5e3a8 0%,#e8c25a 42%,#c99a2e 68%,#f0dc9a 100%);
    box-shadow:
      inset 0 1px 1px rgba(255,255,255,.7),
      inset 0 -1px 2px rgba(70,50,6,.35),
      0 1px 2px rgba(20,22,29,.35),
      0 3px 8px rgba(224,169,44,.38),
      0 0 0 3px rgba(224,169,44,.14);
    animation: breathe 2.8s ease-in-out infinite;}
  @keyframes breathe{0%,100%{box-shadow:inset 0 1px 1px rgba(255,255,255,.7),inset 0 -1px 2px rgba(0,40,15,.35),0 1px 2px rgba(20,22,29,.35),0 3px 8px rgba(37,150,83,.28),0 0 0 3px rgba(61,190,107,.10)}50%{box-shadow:inset 0 1px 1px rgba(255,255,255,.7),inset 0 -1px 2px rgba(0,40,15,.35),0 1px 2px rgba(20,22,29,.35),0 3px 11px rgba(37,150,83,.48),0 0 0 4px rgba(61,190,107,.20)}}
  @keyframes pulsered{0%,100%{transform:scale(1)}50%{transform:scale(1.13)}}
  @media (prefers-reduced-motion: reduce){.dot.on,.dot.warn,.dot.busy{animation:none}}
  .busytag { font-size: 10.5px; color: #C0453E; font-weight: 700; white-space: nowrap; }
  .msg.flash { background: #FFF3D0; box-shadow: 0 0 0 3px #FFE9A8; border-radius: 10px; }
  #offices .chat { display: flex; align-items: center; gap: 8px; }
  #eest { margin-top: auto; }
  .idbtns { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
  .idbtn { background: #fff; border: 1px solid var(--line); color: var(--tx2); font-weight: 500; font-size: 12px; text-align: left; border-radius: 10px; padding: 7px 10px; }
  .idbtn:hover { background: #F7F8FD; }
  #logoutbtn { margin-top: auto; position: sticky; bottom: 0; z-index: 3; width: 100%; border: 0; border-radius: 12px; background: #FDE7EE; color: #B04A70; font-weight: 600; padding: 10px 12px; cursor: pointer; font: inherit; box-shadow: 0 -12px 16px 6px var(--card); }
  #logoutbtn:hover { background: #FBD9E4; }
  .fn { font-size: 11px; color: var(--tx3); line-height: 1.5; margin-top: auto; padding-top: 10px; }

/* профиль участника (клик по человеку в офисе) */
.ov{position:fixed;inset:0;background:rgba(20,22,29,.45);display:flex;align-items:center;justify-content:center;z-index:99}
.profbox{background:#fff;color:#111;border-radius:18px;padding:16px 18px;width:min(430px,92vw);box-shadow:0 18px 50px rgba(20,22,29,.22)}
.profhead{display:flex;align-items:center;gap:10px;border-bottom:1px solid #ECECF4;padding-bottom:10px}
.profwho{flex:1;min-width:0}
.profwho b{font-size:15px}
.proftel{font-size:13px;color:#3E4152;margin-top:2px}
.profmail{font-size:12px;color:#66707F;margin-top:1px;word-break:break-all}
.profx{border:0;background:#F2F3F8;border-radius:10px;width:28px;height:28px;cursor:pointer;color:#3E4152}
.profstats{margin:10px 0}
.prow2{display:flex;justify-content:space-between;gap:12px;font-size:13px;padding:5px 0;border-bottom:1px dashed #F0F0F6}
.prow2 span{color:#66707F}
.prow2 b{font-weight:600;text-align:right}
.profkeys{margin-top:12px;font-size:13px}
.profkeys .idbtns{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.idbtn{border:1px solid #DDE0EA;background:#F7F7FC;border-radius:10px;padding:6px 9px;font-size:12px;cursor:pointer;color:#3E4152}
.profact{margin-top:12px}
.profact button{border:1px solid #DDE0EA;background:#F7F7FC;border-radius:10px;padding:7px 12px;font-size:13px;cursor:pointer}

/* всплывающее меню быстрых действий при наведении (F-43) */
.qm{position:fixed;z-index:120;background:#fff;border:1px solid #ECECF4;border-radius:14px;
  box-shadow:0 1px 2px rgba(110,139,255,.08),0 14px 34px rgba(30,34,48,.16);padding:6px;display:flex;flex-direction:column;gap:2px;min-width:172px}
.qmi{display:flex;align-items:center;gap:9px;border:0;background:transparent;border-radius:10px;
  padding:7px 9px;font-size:13px;color:#3E4152;cursor:pointer;text-align:left;text-decoration:none;font-family:inherit}
.qmi:hover{background:#F2F4FB}
.qmi.off{color:#9BA0B0}
.qmi svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.qmsub{min-width:190px}

/* три колонки: офис (узкий) · чат · инструменты (справа, снизу календарь) */
#side { width: 250px; }
#tools { width: 330px; background: var(--card); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 2px rgba(110,139,255,.06), 0 12px 32px rgba(110,139,255,.08); overflow: hidden; }
#taskzone { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
body:not(.chatmode) #tools { display: none; }
#tools h3 { margin: 0; font-size: 15px; text-align: center; }
#tools h3 small { color: var(--tx3); font-weight: 400; margin-left: 6px; }
#toolslot { display: flex; flex-direction: column; gap: 8px; }
#cal { position: relative; z-index: 2; background: var(--card); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; flex: 0 0 auto; }
  .transcr { font-size: 12px; color: var(--tx2); margin-top: 4px; }
  #micbtn.rec { color: #C0453E; animation: pulsered 1.2s ease-in-out infinite; }
  #micbtn svg { display: block; }
  #voicerec { display: none; flex: 1; align-items: center; color: #C0453E; font-weight: 600; font-size: 14px; }
  #voicedraft { display: none; flex: 1; min-width: 0; gap: 8px; align-items: center; }
  #voicedraft audio { flex: 1; min-width: 0; height: 36px; }
  #voicedraft #draftdur { color: var(--tx2); font-size: 13px; white-space: nowrap; }
  #voicedraft #draftdel { background: #C0453E; }
  .filechip { display: inline-block; margin: 6px 0; padding: 6px 10px; border-radius: 12px; background: var(--sky); color: var(--tx); text-decoration: none; font-size: 13px; font-weight: 600; }
  .filechip:hover { filter: brightness(.96); }
  #bar.rec #voicerec, #bar.draft #voicedraft { display: flex; }
  #bar.rec #text, #bar.rec #sendbtn, #bar.draft #text, #bar.draft #sendbtn { display: none; }
  #chead .hdesc { color: var(--tx3); font-weight: 400; }
.calh { font-size: 12.5px; font-weight: 600; color: var(--tx2); text-transform: capitalize; margin-bottom: 6px; }
.calg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calw { font-size: 10px; color: var(--tx3); text-align: center; padding-bottom: 2px; }
.calpad { aspect-ratio: 1 / 1; }
.cald.we { color: #C0453E; }
.cald { position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; border-radius: 8px; background: #F7F7FC; color: var(--tx); cursor: pointer; }
.cald:hover { background: #EEF1FB; }
.cald.today { outline: 2px solid var(--brand); outline-offset: -1px; }
.cald.has { background: var(--lav); font-weight: 700; }
.cald i { position: absolute; top: 0; right: 2px; font-style: normal; font-size: 9px; color: var(--brand); }
.caladd { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.caladd input { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 12.5px; }
.caladd button { border: 0; background: var(--lav); color: var(--tx); border-radius: 10px; padding: 7px; font: inherit; font-size: 12.5px; cursor: pointer; }
.agbh { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--tx2); margin: 8px 0 4px; text-transform: uppercase; }
.agbh.urgent { color: #C0453E; }
.agb { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 10px; background: #F7F7FC; margin-bottom: 4px; }
.agb b { font-size: 13px; font-weight: 600; }
.agb small { font-size: 11px; color: var(--tx3); }
