/* mock-mentor: overrides that match the approved design mock. Loaded after all other CSS. */
/* Scope: Meu mentor (desktop chat). Colors come from theme tokens so light and dark both work. */

.mentor-workspace :focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* Layout: rail on the left, thread card on the right (mock: 210px rail, 16px gap). */
.mentor-workspace .chat-layout{grid-template-columns:232px minmax(0,1fr);gap:16px}
.mentor-workspace .conversation-history{min-height:0}
.mentor-workspace .conversation-history>summary{
  min-height:44px;display:flex;align-items:center;gap:8px;padding:0 4px;margin-bottom:4px;
  font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);
}
.mentor-workspace .conversation-list.card{
  background:transparent;border:0;padding:0;box-shadow:none;gap:4px;
}
.mentor-workspace .conversation-choice{
  min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:12px;
  background:transparent;color:var(--ink);
}
.mentor-workspace .conversation-choice:hover{background:var(--surface-soft)}
.mentor-workspace{--mentor-ink:var(--ink);--mentor-muted:var(--muted);--mentor-soft:var(--surface-soft)}
/* ux.css maps lime-surface tokens onto .conversation-choice.active; undo that for the neutral active card. */
.mentor-workspace .conversation-choice.active{
  background:var(--white);border-color:var(--line);
  --ink:var(--mentor-ink);--muted:var(--mentor-muted);--surface-soft:var(--mentor-soft);
}
.mentor-workspace .conversation-choice strong{font-size:14px;line-height:1.3;font-weight:600}
.mentor-workspace .conversation-choice small{font-size:12.5px;margin-top:3px;color:var(--muted)}

/* Thread card. */
.mentor-workspace .chat-panel{
  background:var(--white);border:1px solid var(--line);border-radius:16px;overflow:hidden;
  box-shadow:none;
}
.mentor-workspace .chat-header{padding:14px 20px;background:transparent;border-bottom:1px solid var(--line)}
.mentor-workspace .chat-header h2{font-size:17px;font-weight:600;letter-spacing:-.01em;line-height:1.3}
.mentor-workspace .chat-header>button{min-height:36px;padding:0 14px;border-radius:10px;font-size:14px;font-weight:600}
.mentor-workspace .messages{padding:22px 24px;background:transparent;gap:0}
.mentor-workspace .messages>.empty{color:var(--muted);text-align:center;padding:40px 16px}

/* Bubbles: user in lime, mentor answer in a bordered paper card (mock .me / .ai). */
.mentor-workspace .message{margin:0 0 18px;gap:0;flex-direction:column;align-items:flex-start}
.mentor-workspace .message .bubble{
  max-width:86%;padding:18px 20px;border-radius:16px 16px 16px 4px;
  background:var(--paper);border:1px solid var(--line);font-size:15px;line-height:1.65;color:var(--ink);
}
.mentor-workspace .message.user{align-items:flex-end}
.mentor-workspace .message.user .bubble{
  max-width:70%;padding:12px 16px;border:0;border-radius:16px 16px 4px 16px;
  background:var(--accent);color:var(--on-accent);font-weight:500;line-height:1.5;
}
.mentor-workspace .message small{margin-top:10px;font-size:12px;color:var(--muted)}
.mentor-workspace .message.user small{color:var(--on-accent);opacity:.72;margin-top:6px;text-align:right}
.mentor-workspace .message.user .bubble>button{
  min-height:36px;padding:0 12px;border:1px solid var(--on-accent);border-radius:99px;
  background:transparent;color:var(--on-accent);font-weight:600;margin-top:10px;
}
.mentor-workspace .message.user .bubble>button:hover{background:rgba(11,11,11,.08)}
.mentor-workspace .message.assistant .chat-text{font-size:15px}
.mentor-workspace .chat-status:not(.sr-only){font-size:13px;color:var(--muted)}
.mentor-workspace .message.assistant .next-step{
  margin-top:14px;min-height:40px;padding:0 14px;border-radius:99px;
  border:1px solid var(--control-line);background:transparent;color:var(--ink);font-weight:600;font-size:14px;
}
.mentor-workspace .message.assistant .next-step:hover{background:var(--surface-soft)}
.mentor-workspace .message-actions{margin-top:6px;max-width:86%}
.mentor-workspace .message-actions>summary{
  min-height:36px;display:inline-flex;align-items:center;font-size:13px;color:var(--muted);font-weight:500;
}
.mentor-workspace .message-actions>div{display:flex;flex-wrap:wrap;gap:8px;padding-top:6px}
.mentor-workspace .message-actions>div>button{min-height:40px;border-radius:99px;font-size:13.5px}
.mentor-workspace .message .bubble>button.ghost.small{min-height:40px}

/* Composer: card band, outlined field, lime send (mock .comp2). */
.mentor-workspace .chat-composer{
  background:var(--white);border-top:1px solid var(--line);padding:14px 18px;gap:10px;align-items:end;
}
.mentor-workspace .chat-composer textarea{
  min-height:48px;padding:13px 16px;border:1px solid var(--control-line);border-radius:12px;
  background:var(--paper);color:var(--ink);font-size:15px;line-height:1.4;
}
.mentor-workspace .chat-composer textarea::placeholder{color:var(--muted);opacity:1}
.mentor-workspace .chat-composer button[type=submit]{
  height:48px;min-height:48px;padding:0 20px;border-radius:12px;
  background:var(--accent);color:var(--on-accent);font-weight:600;
}
.mentor-workspace .chat-composer button[type=submit]:disabled{opacity:.5}
.mentor-workspace .chat-composer .draft-note{color:var(--muted)}

/* Guidance under the thread stays quiet. */
.mentor-workspace .chat-guidance{font-size:13px;color:var(--muted)}
.mentor-workspace .chat-guidance>summary{font-size:13px}

/* Mobile: keep the mock's bubble rhythm within the narrow thread. */
@media (max-width:900px){
  .mentor-workspace .chat-panel{border-radius:0;border:0}
  .mentor-workspace .messages{padding:14px 12px}
  .mentor-workspace .message .bubble{max-width:92%;line-height:1.5}
  .mentor-workspace .message.user .bubble{max-width:82%}
  .mentor-workspace .chat-composer{padding:10px 12px;gap:8px}
  .mentor-workspace .chat-composer textarea{padding:11px 14px;font-size:16px}
}

/* Assistente pessoal (research page): underline tabs, quiet cards, mock-style progress bar. */
.shell:has(.research-usage) .page-heading{margin-bottom:22px;align-items:flex-end}
.shell:has(.research-usage) .page-heading h1{font-size:30px;line-height:1.15;letter-spacing:-.025em;font-weight:600}
.shell:has(.research-usage) .page-heading p:not(.eyebrow){margin-top:6px;font-size:16px;color:var(--muted)}
.shell:has(.research-usage) .research-section-tabs{
  gap:6px;border-bottom:1px solid var(--line);margin-bottom:24px;overflow-x:auto;scrollbar-width:none;
}
@media (min-width:701px){.shell:has(.research-usage) .research-section-tabs{display:flex}}
.shell:has(.research-usage) .research-section-tabs button{
  min-height:44px;padding:12px 16px;border:0;border-radius:0;border-bottom:2px solid transparent;margin-bottom:-1px;
  background:transparent;color:var(--muted);font-weight:500;white-space:nowrap;
}
.shell:has(.research-usage) .research-section-tabs button:hover{background:transparent;color:var(--ink)}
.shell:has(.research-usage) .research-section-tabs button.primary{color:var(--ink);border-bottom-color:var(--accent);font-weight:600}
.shell:has(.research-usage) .research-usage progress{
  -webkit-appearance:none;appearance:none;height:6px;border:0;border-radius:99px;overflow:hidden;background:var(--surface-soft);
}
.shell:has(.research-usage) .research-usage progress::-webkit-progress-bar{background:var(--surface-soft);border-radius:99px}
.shell:has(.research-usage) .research-usage progress::-webkit-progress-value{background:var(--accent);border-radius:99px}
.shell:has(.research-usage) .research-usage progress::-moz-progress-bar{background:var(--accent);border-radius:99px}
.shell:has(.research-usage) .research-unavailable{
  border:1px solid var(--accent);border-radius:16px;padding:18px 22px;background:var(--white);
}
#research-content .empty{
  border:1.5px dashed var(--control-line);border-radius:16px;padding:28px;text-align:center;color:var(--muted);
}
#research-content .research-briefing,#research-content .research-document{padding:18px 0}

/* Mentor rail: new conversation on top, history below (mock .rail2). */
.mentor-workspace .chat-rail{width:232px;flex:none;display:flex;flex-direction:column;gap:10px;min-height:0}
.mentor-workspace .chat-rail>[data-action=new-conversation]{width:100%;min-height:44px;justify-content:center}
.mentor-workspace .chat-rail>.conversation-history{min-height:0;flex:1}
.mentor-workspace .chat-header-action{min-height:36px;padding:0 14px;border-radius:10px;font-size:14px;font-weight:600}

/* Case strip (closed) and case board (open): read-only, from the case intake. */
.mentor-workspace .case-strip{
  display:flex;align-items:center;gap:12px;padding:10px 20px;border-bottom:1px solid var(--line);
  background:var(--paper);font-size:13.5px;flex-wrap:wrap;
}
.mentor-workspace .case-strip>b{font-weight:600}
.mentor-workspace .case-meter{display:flex;gap:3px}
.mentor-workspace .case-meter i{width:18px;height:5px;border-radius:99px;background:var(--surface-soft)}
.mentor-workspace .case-meter i.on{background:var(--accent)}
.mentor-workspace .case-strip .mut{color:var(--muted)}
.mentor-workspace .case-missing{display:flex;flex-wrap:wrap;gap:6px;align-items:center;color:var(--muted)}
.mentor-workspace .case-chip{padding:2px 9px;border-radius:99px;border:1px dashed var(--control-line);font-size:12.5px;color:var(--ink)}
.mentor-workspace .case-toggle{margin-left:auto;min-height:36px;color:var(--ink);font-weight:600;border:1px solid var(--control-line);background:transparent}
.mentor-workspace .case-toggle:hover{background:var(--surface-soft)}
.mentor-workspace .case-drawer{
  display:flex;gap:24px;flex-wrap:wrap;padding:14px 20px 16px;border-bottom:1px solid var(--line);background:var(--paper);
}
.mentor-workspace .case-drawer[hidden]{display:none}
.mentor-workspace .case-drawer>div{flex:1 1 200px;min-width:0}
.mentor-workspace .case-drawer h4{margin:0 0 8px;font-size:11.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.mentor-workspace .case-drawer p{font-size:14px;line-height:1.5}
.mentor-workspace .case-drawer .f{display:flex;gap:8px;font-size:14px;padding:3px 0;align-items:flex-start}
.mentor-workspace .case-drawer .f i{width:8px;height:8px;border-radius:50%;background:var(--accent);margin-top:7px;flex:none}
.mentor-workspace .case-drawer .f.q i{background:transparent;border:1.5px solid var(--control-line)}
.mentor-workspace .case-drawer .f small{display:block;font-size:12px;color:var(--muted)}
@media (max-width:900px){
  .mentor-workspace .chat-rail{display:contents}
  .mentor-workspace .case-strip{padding:8px 12px;gap:6px 10px}
  .mentor-workspace .case-strip>b,.mentor-workspace .case-strip .mut{white-space:nowrap}
  .mentor-workspace .case-missing{display:none}
  .mentor-workspace .case-toggle{margin-left:0;width:100%;min-height:40px;justify-content:center}
  .mentor-workspace .case-drawer{padding:12px;gap:14px}
}
@media (max-width:700px){.shell:has(.research-usage) .research-usage{padding-block:8px;gap:6px}}
/* Desktop: the history list is always visible, so its summary stays hidden and a plain label replaces it. */
@media (min-width:901px){
  .mentor-workspace .conversation-history>summary{display:none}
  .mentor-workspace .conversation-history::before{content:attr(data-label);display:block;margin-bottom:8px;padding:0 4px;font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
}
/* Narrow desktop (sidebar + rail leave little room): slimmer rail and a compact case strip. */
.mentor-workspace .case-strip,.mentor-workspace .case-drawer{flex-shrink:0}
@media (min-width:901px) and (max-width:1200px){
  .mentor-workspace .chat-layout{grid-template-columns:180px minmax(0,1fr);gap:12px}
  .mentor-workspace .chat-rail{width:180px}
  .mentor-workspace .page{padding-left:16px;padding-right:16px}
  .mentor-workspace .case-strip{padding:8px 14px;gap:8px}
  .mentor-workspace .case-meter,.mentor-workspace .case-missing{display:none}
  .mentor-workspace .chat-header h2{overflow-wrap:break-word;word-break:normal}
}
@media (min-width:901px) and (max-width:1200px){
  .mentor-workspace .chat-header{flex-wrap:wrap;gap:8px}
  .mentor-workspace .chat-header h2{flex:1 1 100%}
}
@media (max-height:700px){
  .mentor-workspace .page-heading p:not(.eyebrow){display:none}
  .mentor-workspace .case-strip{display:none}
}
@media (min-width:901px) and (max-width:1200px){
  .mentor-workspace .chat-header h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px}
  .mentor-workspace .chat-header{padding:8px 14px}
}
@media (max-height:700px){
  .mentor-workspace .chat-composer{padding-top:8px;padding-bottom:8px}
  .mentor-workspace .chat-composer textarea{min-height:44px}
}
/* Phones and tablets keep the thread compact: the case strip is a desktop affordance. */
@media (max-width:900px){.mentor-workspace .case-strip,.mentor-workspace .case-drawer{display:none}}
.mentor-workspace .message.assistant .bubble small{color:var(--muted)}
