﻿/* TaskDay · «Дейли» в боковой панели (фрейм 01A · Сегодня · Дейли открыт · Desktop, 487:128).
   Панель рендерится только на десктопе (≥1025px), поверх страницы, мобильные экраны не затрагивает. */

@media (min-width: 1025px) {
  body.tdtd-daily-open { overflow: hidden; }

  .tdd {
    position: fixed;
    top: 3px;
    right: 0;
    bottom: 0;
    width: 516px;
    z-index: 2400;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: #fafaff;
    border-radius: 9px 9px 0 0;
    box-shadow: -18px 0 40px rgba(26, 36, 54, .10);
    font-family: var(--td-font-sans);
    color: #1a2138;
    animation: tdd-in .16s ease-out;
  }
  .tdd[hidden] { display: none !important; }
  @keyframes tdd-in { from { transform: translateX(18px); opacity: .4; } to { transform: none; opacity: 1; } }

  .tdd-head {
    flex: none;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 24px 14px;
  }
  .tdd-ava {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e8e3ff;
    color: #786be8;
    display: grid;
    place-items: center;
  }
  .tdd-ava .td-icon { width: 20px; height: 20px; }
  .tdd-head__t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .tdd-head__row { display: flex; align-items: center; gap: 8px; }
  .tdd-head__row b { font: 600 18px/24.6px var(--td-font-sans); color: #1a2138; }
  .tdd-head__row i { width: 7px; height: 7px; border-radius: 50%; background: #1f9e73; display: block; }
  .tdd-head__sub { margin: 0; font: 400 12px/16.4px var(--td-font-sans); color: #6e7a94; }
  .tdd-close {
    flex: none;
    width: 36px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #f0f2fc;
    color: #6e7a94;
    font: 600 18px/24.6px var(--td-font-sans);
    cursor: pointer;
    display: grid;
    place-items: center;
  }
  .tdd-close:hover { background: #e6ebfa; color: #1a2138; }

  .tdd-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 24px 16px;
    display: flex;
    flex-direction: column;
  }
  .tdd-context { display: flex; flex-direction: column; gap: 8px; margin-top: 11px; }
  .tdd-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px 0 8px 0;
    background: #e8e3ff;
    color: #4763d4;
    font: 600 12px/16.4px var(--td-font-sans);
  }
  .tdd-chip .td-icon { width: 16px; height: 16px; color: #4763d4; }
  .tdd-context__sub { margin: 0; font: 400 12px/16.4px var(--td-font-sans); color: #6e7a94; }

  .tdd-user {
    align-self: flex-end;
    max-width: 412px;
    margin: 24px 0 0;
    padding: 16px 18px;
    border-radius: 16px;
    background: #e8ebfc;
    font: 400 14px/19.1px var(--td-font-sans);
    color: #1a2138;
  }

  .tdd-msg { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; }
  .tdd-msg__ava {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8e3ff;
    color: #786be8;
    display: grid;
    place-items: center;
  }
  .tdd-msg__ava .td-icon { width: 16px; height: 16px; }
  .tdd-msg__copy { min-width: 0; }
  .tdd-msg__copy h3 { margin: 0; font: 600 18px/24.6px var(--td-font-sans); color: #1a2138; }
  .tdd-msg__copy p { margin: 6px 0 0; font: 400 14px/19.1px var(--td-font-sans); color: #6e7a94; }

  .tdd-reco {
    margin: 26px 0 0 40px;
    padding: 18px;
    border-radius: 16px;
    background: #f0f2fc;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .tdd-reco__label { margin: 0; font: 600 12px/16.4px var(--td-font-sans); color: #4763d4; text-transform: uppercase; letter-spacing: .02em; }
  .tdd-reco h4 { margin: 0; font: 600 18px/24.6px var(--td-font-sans); color: #1a2138; }
  .tdd-reco__item { display: flex; align-items: flex-start; gap: 12px; }
  .tdd-reco__ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
  .tdd-reco__ico.is-keep { background: #dbf5e8; color: #1f9e73; }
  .tdd-reco__ico.is-move { background: #e8e3ff; color: #4763d4; }
  .tdd-reco__ico .td-icon { width: 18px; height: 18px; }
  .tdd-reco__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .tdd-reco__txt b { font: 400 14px/19.1px var(--td-font-sans); color: #1a2138; }
  .tdd-reco__txt span { font: 400 12px/16.4px var(--td-font-sans); color: #6e7a94; }
  .tdd-reco__note { margin: 4px 0 0; font: 400 12px/16.4px var(--td-font-sans); color: #6e7a94; }
  .tdd-reco__actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
  .tdd-btn-apply {
    height: 36px; padding: 0 20px; border: 0; border-radius: 10px; background: #4763d4; color: #fff;
    font: 600 14px/19.1px var(--td-font-sans); cursor: pointer;
  }
  .tdd-btn-apply:hover { background: #3c56bd; }
  .tdd-btn-change {
    height: 36px; padding: 0 20px; border: 0; border-radius: 10px; background: #fafaff; color: #1f2633;
    font: 600 14px/19.1px var(--td-font-sans); cursor: pointer;
  }
  .tdd-btn-change:hover { background: #f0f2fc; }

  .tdd-ask-label { margin: 56px 0 12px; font: 600 14px/19.1px var(--td-font-sans); color: #1a2138; }
  .tdd-follow {
    display: flex; align-items: center; width: 100%; min-height: 38px; padding: 0 14px; margin-bottom: 8px;
    border: 1px solid #f5eaea; border-radius: 11px; background: #fafaff; color: #1a2138;
    font: 400 14px/19.1px var(--td-font-sans); text-align: left; cursor: pointer;
  }
  .tdd-follow:hover { background: #f4f3ff; border-color: #e8e3ff; }

  .tdd-composer {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 24px 20px;
    padding: 0 12px 0 16px;
    min-height: 60px;
    box-sizing: border-box;
    border-radius: 14px;
    background: #f2f2fe;
  }
  .tdd-composer input {
    flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none;
    font: 400 14px/19.1px var(--td-font-sans); color: #1a2138;
  }
  .tdd-composer input::placeholder { color: #6e7a94; }
  .tdd-mic { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #e8e3ff; color: #4763d4; cursor: pointer; display: grid; place-items: center; }
  .tdd-mic .td-icon { width: 18px; height: 18px; }
  .tdd-send { flex: none; width: 32px; height: 29px; padding: 0; border: 0; border-radius: 10px; background: #4763d4; color: #fff; cursor: pointer; display: grid; place-items: center; }
  .tdd-send .td-icon { width: 16px; height: 16px; }
  .tdd-send:hover { background: #3c56bd; }

  /* страница под панелью: центр и вертикальный скролл */
  body[data-desktop-nav="today"] .app-main { overflow-y: auto !important; overflow-x: hidden !important; }
  body[data-desktop-nav="today"] .workspace { min-height: 0 !important; }
  body[data-desktop-nav="today"] #boardGrid.board-grid {
    justify-content: center !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    height: auto !important;
    min-height: min-content !important;
  }
}
.tdtd-daily__top { display: flex; align-items: center; gap: 14px; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.tdtd-daily__ttl { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tdtd-daily__ttl b { font: 600 18px/24.6px var(--td-font-sans); color: #1a263d; }

/* ===== Реальный ИИ-чат Дейли в виде боковой панели (01A) ===== */
@media (min-width: 1025px) {
  body.tdd-ai-daily .ai-bot-root,
  body.tdd-ai-daily .ai-bot-fab { display: none !important; }
  body.tdd-ai-daily .ai-bot-chat-overlay {
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    background: transparent !important;
    pointer-events: auto;
  }
  body.tdd-ai-daily .ai-bot-chat-panel {
    position: relative !important;
    width: 516px !important;
    max-width: 516px !important;
    height: calc(100% - 3px) !important;
    max-height: none !important;
    margin: 3px 0 0 auto !important;
    border: 0 !important;
    border-radius: 9px 9px 0 0 !important;
    background: #fafaff !important;
    box-shadow: -18px 0 40px rgba(26, 36, 54, .10) !important;
    overflow: hidden !important;
  }
  body.tdd-ai-daily .ai-bot-chat-grab,
  body.tdd-ai-daily .ai-bot-chat-task,
  body.tdd-ai-daily .ai-task-hint,
  body.tdd-ai-daily .ai-bot-fn-row,
  body.tdd-ai-daily .ai-bot-task-acts,
  body.tdd-ai-daily .ai-bot-chat-clear { display: none !important; }

  body.tdd-ai-daily .ai-bot-chat-head {
    position: relative;
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 24px 24px 6px !important;
    background: transparent !important;
    border: 0 !important;
  }
  body.tdd-ai-daily .ai-bot-chat-head::before { display: none !important; }
  body.tdd-ai-daily .ai-bot-chat-head-main { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 0; }
  body.tdd-ai-daily .ai-bot-chat-head-av { width: 42px !important; height: 42px !important; flex: none; }
  body.tdd-ai-daily .ai-bot-chat-head-av .daily-avatar,
  body.tdd-ai-daily .ai-bot-chat-head-av svg { width: 42px !important; height: 42px !important; border-radius: 50% !important; }
  body.tdd-ai-daily .ai-bot-chat-head h3 {
    margin: 0 !important;
    font: 600 18px/24.6px var(--td-font-sans) !important;
    color: #1a2138 !important;
    display: block !important;
  }
  body.tdd-ai-daily .ai-bot-chat-badge { display: none !important; }
  body.tdd-ai-daily .ai-bot-chat-status {
    margin: 2px 0 0 !important;
    font: 400 12px/16.4px var(--td-font-sans) !important;
    color: #6e7a94 !important;
    display: block !important;
  }
  body.tdd-ai-daily .ai-bot-chat-status .dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1f9e73; margin-right: 7px;
  }
  .tdd-ai-close {
    position: absolute;
    right: 24px;
    top: 27px;
    width: 36px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #f0f2fc;
    color: #6e7a94;
    font: 600 18px/24.6px var(--td-font-sans);
    cursor: pointer;
    display: grid;
    place-items: center;
  }
  .tdd-ai-close:hover { background: #e6ebfa; color: #1a2138; }

  .tdd-ai-ctx { padding: 10px 24px 0 !important; display: flex !important; flex-direction: column; gap: 8px; }
  .tdd-ai-chip {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    height: 30px; padding: 0 12px; border-radius: 8px 0 8px 0;
    background: #e8e3ff; color: #4763d4; font: 600 12px/16.4px var(--td-font-sans);
  }
  .tdd-ai-chip .td-icon { width: 16px; height: 16px; color: #4763d4; }
  .tdd-ai-ctx__sub { margin: 0; font: 400 12px/16.4px var(--td-font-sans); color: #6e7a94; }

  body.tdd-ai-daily .ai-bot-chat-msgs {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 18px 24px 8px !important;
    gap: 18px !important;
    background: transparent !important;
  }
  body.tdd-ai-daily .ai-bot-msg-row.user { align-items: flex-end !important; }
  body.tdd-ai-daily .ai-bot-msg.user {
    background: #e8ebfc !important;
    color: #1a2138 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    padding: 16px 18px !important;
    font: 400 14px/19.1px var(--td-font-sans) !important;
    max-width: 412px !important;
  }
  body.tdd-ai-daily .ai-bot-msg-col > .ai-bot-msg { max-width: 100% !important; }
  body.tdd-ai-daily .ai-bot-msg-row.user .ai-bot-msg-col { max-width: 412px !important; align-items: flex-end !important; }
  body.tdd-ai-daily .ai-bot-msg-row.bot .ai-bot-msg-col { max-width: 100% !important; }
  body.tdd-ai-daily .ai-bot-msg.bot {
    background: transparent !important;
    border: 0 !important;
    color: #1a2138 !important;
    padding: 0 !important;
    font: 400 14px/19.1px var(--td-font-sans) !important;
  }
  body.tdd-ai-daily .ai-bot-msg.bot .ai-bot-md h1,
  body.tdd-ai-daily .ai-bot-msg.bot .ai-bot-md h2,
  body.tdd-ai-daily .ai-bot-msg.bot .ai-bot-md h3,
  body.tdd-ai-daily .ai-bot-msg.bot .ai-bot-md strong { font: 600 18px/24.6px var(--td-font-sans) !important; color: #1a2138 !important; }
  body.tdd-ai-daily .ai-bot-msg.bot .ai-bot-msg-actions { margin-top: 10px; }

  body.tdd-ai-daily .ai-bot-chat-quick {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 24px 12px !important;
    border-top: 0 !important;
    background: transparent !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
  }
  body.tdd-ai-daily .ai-bot-chat-quick .tdd-ai-ask {
    margin: 34px 0 8px !important;
    font: 600 14px/19.1px var(--td-font-sans) !important;
    color: #1a2138 !important;
  }
  body.tdd-ai-daily .ai-bot-chat-quick button.tdd-ai-follow {
    display: flex !important; align-items: center; justify-content: flex-start;
    width: 100% !important; min-height: 38px !important; padding: 0 14px !important;
    border: 1px solid #f5eaea !important; border-radius: 11px !important;
    background: #fafaff !important; color: #1a2138 !important;
    font: 400 14px/19.1px var(--td-font-sans) !important;
    box-shadow: none !important; white-space: normal !important; text-align: left !important;
  }
  body.tdd-ai-daily .ai-bot-chat-quick button.tdd-ai-follow:hover { background: #f4f3ff !important; border-color: #e8e3ff !important; }

  body.tdd-ai-daily .ai-bot-chat-input {
    margin: 10px 24px 20px !important;
    padding: 0 12px 0 16px !important;
    min-height: 60px !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    background: #f2f2fe !important;
    align-items: center !important;
    gap: 10px !important;
  }
  body.tdd-ai-daily .ai-bot-chat-input .ai-bot-input-wrap { flex: 1 1 auto; min-width: 0; }
  body.tdd-ai-daily .ai-bot-chat-input textarea,
  body.tdd-ai-daily .ai-bot-chat-input input {
    min-height: 34px !important;
    max-height: 90px !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font: 400 14px/19.1px var(--td-font-sans) !important;
    color: #1a2138 !important;
    box-shadow: none !important;
  }
  body.tdd-ai-daily .ai-bot-chat-input textarea::placeholder,
  body.tdd-ai-daily .ai-bot-chat-input input::placeholder { color: #6e7a94 !important; }
  body.tdd-ai-daily .ai-bot-chat-input .input-mic-btn {
    flex: none; width: 32px; height: 32px; padding: 0;
    border-radius: 50%; background: #e8e3ff; color: #4763d4;
  }
  body.tdd-ai-daily .ai-bot-chat-input .input-mic-btn svg { width: 18px; height: 18px; }
  body.tdd-ai-daily .ai-bot-chat-input .send {
    flex: none; width: 32px; height: 29px; min-height: 29px; padding: 0;
    border-radius: 10px; background: #4763d4; color: #fff;
    display: grid; place-items: center;
  }
  body.tdd-ai-daily .ai-bot-chat-input .send svg { width: 16px; height: 16px; }
  body.tdd-ai-daily .ai-bot-chat-input .send:hover { background: #3c56bd; }
}
  body.tdd-ai-daily .ai-bot-chat-head-av {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: #e8e3ff !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
  }
  body.tdd-ai-daily .ai-bot-chat-head-av .daily-avatar { display: none !important; }
  .tdd-ai-ava-ico { display: grid; place-items: center; width: 20px; height: 20px; color: #786be8; font: 400 20px/1 var(--td-font-sans); }
  .tdd-ai-ava-ico .td-icon { width: 20px; height: 20px; color: #786be8; }
