/* FLAITOPS Connect — three-column collaboration shell */

.fl-connect {
  --fc-bg: #071019;
  --fc-panel: #0b1721;
  --fc-panel-2: #111f2b;
  --fc-surface: #0e1822;
  --fc-line: #263746;
  --fc-text: #f3f6f8;
  --fc-muted: #9aaab7;
  --fc-accent: #39e600;
  --fc-accent-ink: #041016;
  --fc-accent-soft: rgba(57, 230, 0, 0.12);
  --fc-accent-edge: rgba(57, 230, 0, 0.35);
  --fc-green-deep: #102d17;
  --fc-danger: #e57373;
  --fc-radius: 16px;
  --fc-gap: 15px;
  --fc-ease: 160ms ease;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: var(--fc-bg);
  color: var(--fc-text);
  font-family: inherit;
  min-height: 0;
  overflow: hidden;
}

.fl-connect[hidden] {
  display: none !important;
}

body.pro-connect-active .workspace-desk-pane {
  background: #071019 !important;
}

body.pro-connect-active .workspace-desk-scroll {
  position: relative;
  min-height: 0;
}

body.pro-connect-active #workspaceConnectRoot.fl-connect {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  overflow: hidden;
  pointer-events: auto;
}

/* Connect owns messaging — beat Assist/pro-ds force-show rules */
body.workspace-professional.pro-connect-active #workspaceTypingArea,
body.workspace-professional.pro-connect-active .workspace-typing-area,
body.workspace-professional.pro-connect-active .workspace-pro-compose-foot,
body.workspace-professional.pro-connect-active #workspaceIntelHostBottom,
body.workspace-professional.pro-connect-active #workspaceIntelHostTop,
body.workspace-professional.pro-connect-active #workspaceIntelHostAssist,
body.workspace-professional.pro-connect-active .ws-intel-host,
body.workspace-professional.pro-connect-active .ws-intel-host--top,
body.workspace-professional.pro-connect-active .ws-intel-host--assist,
body.workspace-professional.pro-connect-active .ws-intel-host--bottom,
body.workspace-professional.pro-connect-active .hp-tube-bottom-dock,
body.workspace-professional.pro-connect-active #workspaceIntelBar,
body.workspace-professional.pro-connect-active .ws-intel,
body.workspace-professional.pro-connect-active .ws-intel:not([hidden]),
body.pro-overview-active.pro-connect-active #workspaceTypingArea,
body.pro-overview-active.pro-connect-active .workspace-typing-area,
body.pro-overview-active.pro-connect-active .workspace-pro-compose-foot,
body.pro-overview-active.pro-connect-active:not(.pro-overview-assist-min) #workspaceTypingArea,
body.pro-overview-active.pro-connect-active:not(.pro-overview-assist-min) .workspace-pro-compose-foot,
body.workspace-professional.workspace-connect-open #workspaceTypingArea,
body.workspace-professional.workspace-connect-open .workspace-typing-area,
body.workspace-professional.workspace-connect-open .workspace-pro-compose-foot,
body.workspace-professional.workspace-connect-open #workspaceIntelHostBottom,
body.workspace-professional.workspace-connect-open #workspaceIntelHostTop,
body.workspace-professional.workspace-connect-open #workspaceIntelHostAssist,
body.workspace-professional.workspace-connect-open .ws-intel-host,
body.workspace-professional.workspace-connect-open .ws-intel-host--top,
body.workspace-professional.workspace-connect-open .ws-intel-host--assist,
body.workspace-professional.workspace-connect-open .ws-intel-host--bottom,
body.workspace-professional.workspace-connect-open .hp-tube-bottom-dock,
body.workspace-professional.workspace-connect-open #workspaceIntelBar,
body.workspace-professional.workspace-connect-open .ws-intel,
body.workspace-professional.workspace-connect-open .ws-intel:not([hidden]),
body.pro-overview-active.workspace-connect-open #workspaceTypingArea,
body.pro-overview-active.workspace-connect-open .workspace-typing-area,
body.pro-overview-active.workspace-connect-open .workspace-pro-compose-foot,
body.pro-overview-active.workspace-connect-open:not(.pro-overview-assist-min) #workspaceTypingArea,
body.pro-overview-active.workspace-connect-open:not(.pro-overview-assist-min) .workspace-pro-compose-foot {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  z-index: -1 !important;
}

/* ── Hero ── */
.fc-hero {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  min-height: 96px;
  height: clamp(90px, 12vh, 110px);
  display: flex;
  align-items: center;
  padding: 0 1.15rem;
  overflow: hidden;
  isolation: isolate;
}

.fc-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.fc-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

.fc-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 16, 25, 0.92) 0%, rgba(7, 16, 25, 0.72) 38%, rgba(7, 16, 25, 0.35) 68%, rgba(7, 16, 25, 0.55) 100%);
}

.fc-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.fc-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(16, 45, 23, 0.92);
  border: 1px solid rgba(57, 230, 0, 0.42);
  color: var(--fc-accent);
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(57, 230, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.28);
}

.fc-brand-icon .material-symbols-rounded {
  font-size: 1.4rem;
}

.fc-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.fc-brand-copy strong {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.fc-brand-copy span {
  font-size: 0.86rem;
  color: rgba(243, 246, 248, 0.82);
  line-height: 1.35;
}

/* ── Layout V2: picker? | chat | context (+ navrail flutuante) ── */
.fc-layout {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  gap: var(--fc-gap);
  padding: 0.75rem 1rem 1rem;
  overflow: hidden;
}

.fc-layout.is-picker-open {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(360px, 410px);
}

.fc-picker,
.fc-chat,
.fc-context {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Rail flutuante — mesmo comportamento/design Explorer + Learning Hub */
.fc-navrail-wrap{
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  z-index:24;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:0;
  width:3.2rem;
  max-width:none;
  min-height:min(70vh,520px);
  padding:1rem 0 1rem max(.55rem, env(safe-area-inset-left));
  pointer-events:auto;
  opacity:1;
  filter:none;
}
.fc-navrail{
  pointer-events:none;
  display:flex;
  flex-direction:column;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:center;
  gap:.18rem;
  width:46px;
  padding:.42rem .28rem;
  margin:0;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(10,14,20,.72);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  box-shadow:0 10px 28px rgba(0,0,0,.38);
  overflow:visible;
  opacity:0;
  transform:translate3d(-12px,0,0);
  transition:
    opacity .22s ease,
    transform .28s cubic-bezier(.16,1,.3,1);
}
.fc-navrail-wrap:hover .fc-navrail,
.fc-navrail-wrap:focus-within .fc-navrail,
.fc-navrail-wrap.is-revealed .fc-navrail{
  opacity:1;
  transform:translate3d(0,0,0);
  pointer-events:auto;
}
/* Botões = Explorer Pro (círculo 28px, verde discreto, sem glow) */
.fc-navrail-btn{
  position:relative;
  appearance:none;
  width:28px;
  height:28px;
  min-width:28px;
  min-height:28px;
  margin:0;
  padding:0;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.03);
  color:rgba(198,211,226,.78);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:1!important;
  box-shadow:none;
  backdrop-filter:none;
  white-space:nowrap;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}
.fc-navrail-btn .material-symbols-rounded{
  font-size:1.15rem;
  font-variation-settings:'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 24;
  line-height:1;
  transition:color .18s ease;
}
.fc-navrail-btn:hover:not(.is-active),
.fc-navrail-btn:focus-visible:not(.is-active){
  border-color:rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#e8eef4;
  box-shadow:none;
  outline:none;
}
.fc-navrail-btn.is-active{
  border-color:rgba(107,207,58,.28);
  background:rgba(107,207,58,.16);
  color:#e8eef4;
  box-shadow:none;
}
.fc-navrail-tip{
  position:absolute;
  left:calc(100% + 10px);
  top:50%;
  transform:translateY(-50%);
  padding:.28rem .55rem;
  border-radius:7px;
  background:rgba(16,20,28,.94);
  border:1px solid rgba(255,255,255,.1);
  color:#f3f6f8;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.01em;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .14s ease,visibility .14s ease;
  box-shadow:0 6px 16px rgba(0,0,0,.35);
  z-index:5;
}
.fc-navrail-tip::before{
  content:"";
  position:absolute;
  left:-5px;top:50%;
  width:8px;height:8px;
  transform:translateY(-50%) rotate(45deg);
  background:rgba(16,20,28,.94);
  border-left:1px solid rgba(255,255,255,.1);
  border-bottom:1px solid rgba(255,255,255,.1);
}
.fc-navrail-btn:hover .fc-navrail-tip,
.fc-navrail-btn:focus .fc-navrail-tip,
.fc-navrail-btn:focus-visible .fc-navrail-tip{
  opacity:1;
  visibility:visible;
}
@media (hover:none){
  .fc-navrail{
    opacity:1;
    transform:none;
    pointer-events:auto;
  }
}

.fc-picker {
  background: var(--fc-panel);
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: fc-picker-in 210ms ease;
}

.fc-picker[hidden] {
  display: none !important;
}

@keyframes fc-picker-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fc-picker { animation: none; }
  .fc-navrail,
  .fc-navrail-btn,
  .fc-navrail-tip { transition: none; }
}

.fc-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0.85rem 0.9rem 0.45rem;
  flex-shrink: 0;
}

.fc-picker-head strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fc-picker-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fc-chat,
.fc-context {
  background: #081a24;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.fc-chat {
  position: relative;
  background: #081a24;
}

.fc-context {
  background: var(--fc-panel);
}

/* ── Rail tools ── */
.fc-rail-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem 0.45rem;
  flex-shrink: 0;
}

.fc-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--fc-panel-2);
  border: 1px solid var(--fc-line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  min-width: 0;
  transition: border-color var(--fc-ease);
}

.fc-search:focus-within {
  border-color: var(--fc-accent-edge);
}

.fc-search .material-symbols-rounded {
  font-size: 1.05rem;
  color: var(--fc-muted);
}

.fc-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fc-text);
  font: inherit;
  font-size: 0.84rem;
  min-width: 0;
}

.fc-new-msg {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--fc-accent);
  color: var(--fc-accent-ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 0 0.85rem;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  transition: filter var(--fc-ease);
}

.fc-new-msg .material-symbols-rounded {
  font-size: 1.1rem;
}

.fc-new-msg:hover {
  filter: brightness(1.06);
}

.fc-iconbtn {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--fc-line);
  background: var(--fc-panel-2);
  color: var(--fc-muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: color var(--fc-ease), border-color var(--fc-ease), background var(--fc-ease);
}

.fc-iconbtn .material-symbols-rounded {
  font-size: 1.15rem;
}

.fc-iconbtn:hover {
  color: var(--fc-text);
  border-color: rgba(255, 255, 255, 0.16);
}

.fc-iconbtn--accent {
  background: var(--fc-accent);
  border-color: transparent;
  color: var(--fc-accent-ink);
}

.fc-iconbtn--accent:hover {
  filter: brightness(1.05);
}

.fc-iconbtn:disabled,
.fc-iconbtn.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.fc-iconbtn.is-active {
  color: var(--fc-accent);
  border-color: var(--fc-accent-edge);
  background: var(--fc-accent-soft);
}

/* ── Filters ── */
.fc-filters {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.9rem 0.7rem;
  flex-shrink: 0;
}

.fc-filter {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fc-muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--fc-ease), color var(--fc-ease), border-color var(--fc-ease);
}

.fc-filter:hover {
  color: var(--fc-text);
}

.fc-filter.is-active {
  background: var(--fc-green-deep);
  border-color: rgba(57, 230, 0, 0.3);
  color: var(--fc-accent);
}

.fc-filter-count {
  margin-left: 0.2rem;
  opacity: 0.85;
}

/* ── List ── */
.fc-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0.45rem 0.75rem;
}

.fc-section-label {
  margin: 0.55rem 0.55rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fc-muted);
}

.fc-row {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.72rem 0.7rem;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  margin-bottom: 2px;
  transition: background var(--fc-ease);
}

.fc-row--static,
.fc-row--person {
  cursor: default;
}

.fc-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.fc-row.is-active {
  background: rgba(16, 45, 23, 0.72);
  box-shadow: inset 0 0 0 1px rgba(57, 230, 0, 0.28);
}

.fc-row.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: var(--fc-accent);
}

.fc-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fc-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.fc-row-top strong,
.fc-row-main > strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.fc-row-top time {
  flex: 0 0 auto;
  font-size: 0.7rem;
  color: var(--fc-muted);
}

.fc-row-main > span {
  font-size: 0.78rem;
  color: var(--fc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-row-actions {
  display: flex;
  gap: 0.35rem;
}

.fc-row--dm {
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  padding: 0.4rem 0.4rem 0.4rem 0.5rem;
}

.fc-row-open {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  min-width: 0;
  padding: 0.32rem 0.3rem;
  border-radius: 10px;
  cursor: pointer;
}

.fc-row-open:hover {
  background: transparent;
}

.fc-row-trailing {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 0 0 auto;
  position: relative;
}

.fc-row-icon {
  width: 30px;
  height: 30px;
  opacity: 0.45;
  border-color: transparent;
  background: transparent;
}

.fc-row:hover .fc-row-icon,
.fc-row.is-active .fc-row-icon,
.fc-row-more.is-open .fc-row-icon,
.fc-row-sound.is-open .fc-row-icon {
  opacity: 1;
}

.fc-row-icon.is-muted,
.fc-row.is-muted .fc-row-icon.is-muted {
  opacity: 0.9;
  color: var(--fc-muted);
}

.fc-row-icon.is-fav {
  opacity: 1;
  color: var(--fc-accent);
}

.fc-row-icon .material-symbols-rounded.is-filled {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.fc-row-more,
.fc-row-sound {
  position: relative;
}

.fc-row-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  min-width: 180px;
  background: #141f2a;
  border: 1px solid var(--fc-line);
  border-radius: 12px;
  padding: 0.4rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fc-sound-menu {
  min-width: 200px;
}

.fc-sound-option {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.fc-sound-option .material-symbols-rounded {
  font-size: 1rem;
  opacity: 0.7;
}

.fc-sound-option.is-selected {
  background: var(--fc-accent-soft);
  color: #e8ffd6;
}

.fc-sound-option.is-selected .material-symbols-rounded {
  opacity: 1;
  color: var(--fc-accent);
}

.fc-row-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fc-text);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.fc-row-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fc-row-menu--danger {
  color: #ff8f8f !important;
}

.fc-unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fc-accent);
  box-shadow: 0 0 0 3px rgba(57, 230, 0, 0.15);
}

.fc-unread-dot--spacer {
  visibility: hidden;
  box-shadow: none;
}

/* ── Avatars / presence ── */
.fc-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 0;
}

.fc-presence {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--fc-panel);
  box-sizing: border-box;
  pointer-events: none;
}

.fc-presence--online,
.fc-presence--status-online {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.fc-presence--status-busy {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22);
}

.fc-presence--status-flying {
  background: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
}

.fc-presence--status-studying {
  background: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.22);
}

.fc-presence--offline {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22);
}

.fc-chat-head .fc-presence,
.fc-msg .fc-presence {
  display: none !important;
}

.fc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #1a2733;
}

.fc-avatar--sm {
  width: 28px;
  height: 28px;
  margin-top: 2px;
}

.fc-avatar--lg {
  width: 72px;
  height: 72px;
  font-size: 1.2rem;
}

.fc-avatar--xl {
  width: 88px;
  height: 88px;
  font-size: 1.4rem;
}

.fc-avatar--fallback {
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 750;
  color: #c8f5a8;
  background: rgba(57, 230, 0, 0.12);
  border: 1px solid rgba(57, 230, 0, 0.22);
}

.fc-avatar--lg.fc-avatar--fallback,
.fc-avatar--xl.fc-avatar--fallback {
  font-size: 1.25rem;
}

/* ── Profile (people tab center) ── */
.fc-profile {
  margin: auto;
  max-width: 420px;
  padding: 2rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.fc-profile h2 {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  font-weight: 750;
}

.fc-profile-rel {
  margin: 0;
  color: var(--fc-accent);
  font-size: 0.84rem;
  font-weight: 650;
}

.fc-profile-meta {
  margin: 0;
  color: var(--fc-muted);
  font-size: 0.88rem;
}

.fc-profile-note {
  margin: 0.55rem 0 0;
  color: var(--fc-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 34ch;
}

.fc-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.55rem;
}

/* ── Chat header ── */
.fc-chat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--fc-line);
  background: rgba(14, 24, 34, 0.92);
  flex-shrink: 0;
}

.fc-chat-head-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.fc-chat-head-copy strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.fc-chat-head-copy span,
.fc-chat-status {
  font-size: 0.75rem;
  color: var(--fc-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.fc-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex: 0 0 auto;
}

.fc-online-dot--busy {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.fc-online-dot--flying {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.fc-online-dot--studying {
  background: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.fc-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.fc-chat-close {
  margin-left: 0.15rem;
}
.fc-chat-close:hover {
  color: #f8fafc;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
}

.fc-chat-search {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--fc-line);
  background: var(--fc-panel);
}

.fc-chat-search input {
  width: 100%;
  border: 1px solid var(--fc-line);
  border-radius: 9px;
  background: var(--fc-panel-2);
  color: var(--fc-text);
  font: inherit;
  font-size: 0.84rem;
  padding: 0.55rem 0.75rem;
}

.fc-menu {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 5;
  width: min(280px, calc(100% - 24px));
  background: #141f2a;
  border: 1px solid var(--fc-line);
  border-radius: 12px;
  padding: 0.55rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fc-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fc-text);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}

.fc-menu button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.fc-menu-sep {
  height: 1px;
  background: var(--fc-line);
  margin: 0.25rem 0;
}

.fc-menu-label {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fc-muted);
  padding: 0.35rem 0.6rem;
}

.fc-menu-member {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  color: var(--fc-muted);
}

.fc-menu-member button {
  color: var(--fc-danger);
  padding: 0.2rem 0.35rem;
  font-size: 0.75rem;
}

/* ── Messages ── */
.fc-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--fc-panel);
}

.fc-day {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0.15rem 0;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--fc-muted);
}

.fc-day::before,
.fc-day::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--fc-line);
}

.fc-day span {
  flex: 0 0 auto;
}

.fc-load-older {
  align-self: center;
  appearance: none;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-muted);
  font: inherit;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

.fc-msg {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  max-width: min(70%, 560px);
  align-self: flex-start;
}

.fc-msg.is-mine {
  align-self: flex-end;
  grid-template-columns: 1fr;
}

.fc-msg.is-pending {
  opacity: 0.72;
}

.fc-msg.is-group-cont {
  margin-top: -0.55rem;
}

.fc-msg.is-group-cont .fc-avatar-wrap,
.fc-msg.is-group-cont .fc-msg-meta strong {
  visibility: hidden;
}

.fc-msg.is-group-cont .fc-avatar-wrap {
  height: 0;
  overflow: hidden;
}

.fc-msg-main {
  min-width: 0;
  background: var(--fc-panel-2);
  border: 1px solid rgba(38, 55, 70, 0.85);
  border-radius: 14px 14px 14px 6px;
  padding: 0.65rem 0.8rem 0.55rem;
}

.fc-msg.is-mine .fc-msg-main {
  background: rgba(16, 45, 23, 0.88);
  border-color: rgba(57, 230, 0, 0.28);
  border-radius: 14px 14px 6px 14px;
}

.fc-msg-meta {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  color: var(--fc-muted);
}

.fc-msg-meta strong {
  color: #e8eaed;
  font-size: 0.8rem;
}

.fc-msg-seen {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: rgba(176, 190, 204, 0.42);
  line-height: 1;
}

.fc-msg-seen .material-symbols-rounded {
  font-size: 14px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.fc-msg.is-mine .fc-msg-seen {
  color: rgba(176, 190, 204, 0.48);
}

.fc-msg-body {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.fc-msg-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.35rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.fc-msg:hover .fc-msg-actions {
  opacity: 1;
}

.fc-msg-actions button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fc-muted);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0;
}

.fc-msg-actions button:hover {
  color: var(--fc-text);
}

.fc-share-card {
  margin-top: 0.55rem;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid var(--fc-line);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  border-radius: 9px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fc-share-card strong {
  font-size: 0.84rem;
}

.fc-share-card span {
  font-size: 0.74rem;
  color: var(--fc-muted);
}

.fc-reply-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 1rem;
  border-top: 1px solid var(--fc-line);
  background: rgba(57, 230, 0, 0.06);
  font-size: 0.78rem;
  color: var(--fc-muted);
}

.fc-reply-bar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fc-text);
  cursor: pointer;
  font-size: 1rem;
}

/* ── Composer ── */
.fc-composer-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 8;
  padding: 0.65rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(7, 16, 25, 0.35));
}

.fc-composer {
  position: relative;
  border: 1px solid var(--fc-line);
  border-radius: 16px;
  padding: 0.45rem 0.5rem 0.45rem 0.4rem;
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
  flex-shrink: 0;
  background: var(--fc-panel-2);
  z-index: 6;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.fc-composer-tool {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--fc-muted);
  border-radius: 10px;
  cursor: pointer;
  flex: 0 0 auto;
  margin-bottom: 2px;
  transition: color var(--fc-ease), background var(--fc-ease), border-color var(--fc-ease);
}

.fc-composer-tool .material-symbols-rounded {
  font-size: 1.25rem;
}

.fc-composer-tool:hover,
.fc-composer-tool.is-active {
  color: var(--fc-text);
  border-color: rgba(57, 230, 0, 0.28);
  background: rgba(57, 230, 0, 0.08);
}

.fc-emoji-picker {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 8px);
  width: min(360px, calc(100% - 24px));
  max-height: min(380px, 52vh);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d1520;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 12;
}

.fc-emoji-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fc-emoji-picker-head strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.fc-emoji-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fc-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.fc-emoji-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.fc-emoji-search input {
  width: 100%;
  border: 1px solid var(--fc-line);
  border-radius: 10px;
  background: #0b1016;
  color: var(--fc-text);
  font: inherit;
  font-size: 0.84rem;
  padding: 0.55rem 0.7rem;
}

.fc-emoji-search input:focus {
  outline: none;
  border-color: var(--fc-accent-edge);
}

.fc-emoji-tabs {
  display: flex;
  gap: 0.35rem;
}

.fc-emoji-tab {
  appearance: none;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.fc-emoji-tab.is-active {
  color: var(--fc-accent-ink);
  background: var(--fc-accent);
  border-color: transparent;
}

.fc-emoji-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  overflow: auto;
  min-height: 140px;
  max-height: 240px;
  padding-right: 0.15rem;
}

.fc-emoji-item {
  appearance: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0.2rem;
}

.fc-emoji-item:hover,
.fc-emoji-item:focus-visible {
  border-color: rgba(57, 230, 0, 0.35);
  background: rgba(57, 230, 0, 0.1);
  outline: none;
}

.fc-emoji-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  image-rendering: auto;
}

.fc-emoji-item--std span {
  font-size: 1.25rem;
  line-height: 1;
}

.fc-emoji-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--fc-muted);
  font-size: 0.8rem;
  padding: 1.2rem 0.5rem;
}

.fc-msg-body .fc-emoji,
.fc-row-preview .fc-emoji,
.fc-draft .fc-emoji {
  width: 1.45em;
  height: 1.45em;
  vertical-align: -0.28em;
  display: inline-block;
  object-fit: contain;
  margin: 0 0.08em;
  image-rendering: auto;
}

.fc-row-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-row-preview .fc-emoji {
  width: 1.2em;
  height: 1.2em;
}

.fc-draft .fc-emoji--draft {
  width: 1.55em;
  height: 1.55em;
  vertical-align: -0.32em;
  pointer-events: none;
  user-select: none;
}

.fc-composer textarea,
.fc-composer .fc-draft {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 140px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--fc-text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.65rem 0.55rem;
  line-height: 1.4;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}

.fc-composer .fc-draft:focus,
.fc-composer textarea:focus {
  outline: none;
}

.fc-composer .fc-draft.is-empty::before {
  content: attr(data-placeholder);
  color: var(--fc-muted);
  pointer-events: none;
}

.fc-send {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--fc-accent);
  color: var(--fc-accent-ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  padding: 0.65rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  transition: filter var(--fc-ease);
}

.fc-send .material-symbols-rounded {
  font-size: 1.05rem;
}

.fc-send:hover:not(:disabled) {
  filter: brightness(1.05);
}

.fc-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Context panel ── */
.fc-context-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.15rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.fc-context-empty {
  margin: auto;
  text-align: center;
  color: var(--fc-muted);
  font-size: 0.84rem;
  padding: 1.5rem 1rem;
  max-width: 26ch;
  line-height: 1.45;
}

.fc-context-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding-bottom: 0.35rem;
}

.fc-context-profile h3 {
  margin: 0.45rem 0 0;
  font-size: 1.1rem;
  font-weight: 750;
  color: #fff;
}

.fc-context-role {
  margin: 0;
  font-size: 0.82rem;
  color: var(--fc-muted);
}

.fc-context-facts {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  padding: 0.15rem 0.15rem 0;
}

.fc-context-fact {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.8rem;
}

.fc-context-fact dt {
  margin: 0;
  color: var(--fc-muted);
  font-weight: 650;
}

.fc-context-fact dd {
  margin: 0;
  color: var(--fc-text);
  font-weight: 600;
  text-align: right;
  min-width: 0;
  word-break: break-word;
}

.fc-context-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.fc-context-action {
  appearance: none;
  border: 1px solid var(--fc-line);
  background: var(--fc-panel-2);
  color: var(--fc-muted);
  border-radius: 12px;
  padding: 0.65rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 650;
  transition: background var(--fc-ease), color var(--fc-ease), border-color var(--fc-ease);
}

.fc-context-action .material-symbols-rounded {
  font-size: 1.2rem;
}

.fc-context-action:hover:not(:disabled):not(.is-disabled) {
  color: var(--fc-text);
  border-color: rgba(255, 255, 255, 0.14);
}

.fc-context-action.is-active {
  background: var(--fc-green-deep);
  border-color: rgba(57, 230, 0, 0.35);
  color: var(--fc-accent);
}

.fc-context-action:disabled,
.fc-context-action.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.fc-context-section {
  border-top: 1px solid var(--fc-line);
  padding-top: 0.85rem;
}

.fc-context-section-head {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--fc-text);
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.fc-context-section-head strong {
  font-size: 0.84rem;
  font-weight: 700;
}

.fc-context-section-head span {
  font-size: 0.72rem;
  color: var(--fc-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.fc-context-section-body {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fc-context-section.is-collapsed .fc-context-section-body {
  display: none;
}

.fc-file-row,
.fc-link-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background var(--fc-ease), border-color var(--fc-ease);
}

.fc-file-row:hover,
.fc-link-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--fc-line);
}

.fc-file-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: var(--fc-panel-2);
  border: 1px solid var(--fc-line);
  color: var(--fc-accent);
  flex: 0 0 auto;
}

.fc-file-ico .material-symbols-rounded {
  font-size: 1.1rem;
}

.fc-file-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.fc-file-meta strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-file-meta span {
  font-size: 0.7rem;
  color: var(--fc-muted);
}

.fc-context-empty-inline {
  font-size: 0.76rem;
  color: var(--fc-muted);
  padding: 0.2rem 0.1rem;
}

.fc-context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.fc-tag {
  appearance: none;
  border: 1px solid var(--fc-line);
  background: var(--fc-panel-2);
  color: var(--fc-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
}

/* ── Buttons / empty / modal ── */
.fc-btn {
  appearance: none;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.fc-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.fc-btn--primary {
  background: var(--fc-accent);
  border-color: transparent;
  color: var(--fc-accent-ink);
}

.fc-empty {
  margin: 1.5rem auto;
  text-align: center;
  color: var(--fc-muted);
  padding: 1.25rem;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
}

.fc-empty--chat {
  margin: auto;
}

.fc-empty--scene {
  position: relative;
  max-width: 420px;
  padding: 2.5rem 1.25rem 2rem;
  z-index: 1;
}

.fc-empty-scene {
  position: absolute;
  inset: auto 0 8%;
  height: 120px;
  pointer-events: none;
  opacity: 0.42;
  overflow: hidden;
}

.fc-empty-horizon {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 160%;
  height: 90px;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(57, 230, 0, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(20, 40, 70, 0.35), rgba(8, 14, 22, 0.75));
  border-top: 1px solid rgba(57, 230, 0, 0.18);
}

.fc-empty-arcs {
  position: absolute;
  inset: 10px 12% 28px;
  border: 1px dashed rgba(57, 230, 0, 0.28);
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
}

.fc-empty-plane {
  position: absolute;
  left: 58%;
  bottom: 58px;
  width: 10px;
  height: 10px;
  background: var(--fc-accent);
  clip-path: polygon(0 45%, 55% 40%, 100% 50%, 55% 60%, 0 55%, 18% 50%);
  box-shadow: 0 0 10px rgba(57, 230, 0, 0.45);
}

.fc-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
  color: var(--fc-accent);
  background: rgba(57, 230, 0, 0.08);
  border: 1px solid rgba(57, 230, 0, 0.2);
  font-size: 1.55rem !important;
  position: relative;
  z-index: 1;
}

.fc-messages:not(:has(.fc-empty--scene)) .fc-empty-scene {
  display: none;
}

.fc-empty strong {
  color: var(--fc-text);
  font-size: 0.98rem;
  position: relative;
  z-index: 1;
}

.fc-empty span {
  font-size: 0.84rem;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.fc-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.fc-muted {
  color: var(--fc-muted);
  font-size: 0.8rem;
}

.fc-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.fc-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--fc-muted);
}

.fc-form input,
.fc-form textarea,
.fc-form select {
  border: 1px solid var(--fc-line);
  border-radius: 8px;
  background: #0b1016;
  color: var(--fc-text);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.55rem 0.7rem;
}

.fc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 8, 14, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fc-modal {
  width: min(420px, 100%);
  background: #141f2a;
  border: 1px solid var(--fc-line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  color: var(--fc-text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.fc-modal h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.fc-modal p {
  margin: 0 0 0.9rem;
  font-size: 0.84rem;
  color: var(--fc-muted);
}

.fc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.fc-error {
  position: relative;
  z-index: 1;
  color: var(--fc-danger);
  font-size: 0.78rem;
  padding: 0.55rem 1.25rem;
}

.fc-row.is-unavailable .fc-row-preview {
  color: rgba(180, 196, 210, 0.62);
  font-style: italic;
}

.fc-peer-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0.85rem 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 170, 190, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 230, 238, 0.88);
}

.fc-peer-notice .material-symbols-rounded {
  color: rgba(180, 196, 210, 0.72);
  font-size: 1.25rem;
  margin-top: 0.05rem;
}

.fc-peer-notice strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}

.fc-peer-notice span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.74rem;
  color: rgba(180, 196, 210, 0.72);
  line-height: 1.35;
}

.fc-mobile-back {
  display: none;
}

.fc-context-toggle {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 1280px) {
  .fc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .fc-layout.is-picker-open {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }

  .fc-context {
    display: none;
  }

  .fc-context-toggle {
    display: inline-grid;
  }

  .fc-layout.is-context-open .fc-context {
    display: flex;
    position: absolute;
    top: 0;
    right: 1rem;
    bottom: 1rem;
    width: min(360px, calc(100% - 5rem));
    z-index: 12;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  }

  .fc-layout.is-picker-open .fc-picker {
    position: relative;
    z-index: 8;
  }
}

@media (max-width: 900px) {
  .fc-hero {
    min-height: 78px;
    height: 78px;
    padding: 0 0.85rem;
  }

  .fc-brand-copy strong {
    font-size: 1.35rem;
  }

  .fc-layout,
  .fc-layout.is-picker-open {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.55rem 0.65rem 0.75rem;
    gap: 0.65rem;
  }

  .fc-navrail-wrap{
    left:0;
    top:auto;
    bottom:max(1rem, env(safe-area-inset-bottom));
    transform:none;
    width:auto;
    min-height:0;
    padding:.35rem max(.4rem, env(safe-area-inset-left));
  }
  .fc-navrail{
    opacity:1;
    transform:none;
    pointer-events:auto;
    flex-direction:row;
    width:auto;
    max-width:min(92vw,420px);
  }
  .fc-navrail-tip{display:none}

  .fc-layout.is-picker-open .fc-picker {
    position: absolute;
    left: 0.65rem;
    top: 0;
    bottom: 0.75rem;
    width: min(320px, calc(100% - 1.3rem));
    z-index: 14;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  }

  .fc-layout:not(.is-chat-open) .fc-chat,
  .fc-layout:not(.is-chat-open) .fc-context {
    display: none;
  }

  .fc-layout.is-chat-open:not(.is-context-open) .fc-context {
    display: none;
  }

  .fc-layout.is-chat-open.is-context-open .fc-chat {
    display: none;
  }

  .fc-layout.is-chat-open.is-context-open .fc-context {
    display: flex;
    position: relative;
    inset: auto;
    width: auto;
    box-shadow: none;
  }

  .fc-mobile-back {
    display: inline-grid;
  }

  .fc-emoji-picker {
    left: 8px;
    right: 8px;
    width: auto;
    max-height: min(360px, 46vh);
  }

  .fc-emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-height: 200px;
  }
}

/* Rail badge — número encostado à direita do item */
.workspace-rail-item[data-ws-nav='connect'] {
  position: relative;
}

.workspace-rail-item[data-ws-nav='connect'] .workspace-rail-label,
.workspace-rail-item[data-ws-nav='connect'] .ws-collapsed-sidebar-item__label {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0.25rem;
}

.workspace-rail-item[data-ws-nav='connect'] .workspace-rail-badge-count {
  margin-left: auto;
  align-self: center;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(57, 230, 0, 0.22);
  color: #39e600;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.workspace-rail-collapsed .workspace-rail-item[data-ws-nav='connect'] .workspace-rail-badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  margin-left: 0;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 9px;
}
