/* FLAITOPS Chat — premium conversation chrome */
body.chat-open{
  background:#060c12 !important;
}
body.chat-open .page-bg::before{
  background:
    radial-gradient(circle at 50% 18%, rgba(69,255,96,.05), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(40,90,160,.04), transparent 24%) !important;
  animation:none !important;
}
body.chat-open .page-bg::after{
  opacity:.55 !important;
  background-image:
    radial-gradient(circle, rgba(69,255,96,.22) 1px, transparent 1.2px) !important;
  background-size:52px 52px !important;
}
body.chat-open .network-canvas{
  opacity:.42 !important;
}
body.chat-open .chat-view::before{
  background:
    radial-gradient(circle at 50% 0%, rgba(69,255,96,.04), transparent 34%),
    linear-gradient(180deg, rgba(4,10,16,.2), transparent 28%) !important;
}

.fc-topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:90;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:max(.85rem, env(safe-area-inset-top)) max(1.1rem, env(safe-area-inset-right)) .55rem max(1.1rem, env(safe-area-inset-left));
  pointer-events:none;
}
.fc-topbar > *{pointer-events:auto}
.fc-topbar-auth{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-left:auto;
  opacity:1;
  transform:none;
  filter:none;
}
.fc-auth-guest{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
}
.fc-auth-btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:.34rem;
  min-height:34px;
  padding:.38rem .78rem;
  border-radius:999px;
  border:1px solid rgba(238,243,245,.12);
  background:rgba(8,14,20,.52);
  backdrop-filter:blur(16px) saturate(1.08);
  -webkit-backdrop-filter:blur(16px) saturate(1.08);
  color:rgba(238,243,245,.78);
  font-size:.74rem;
  font-weight:600;
  letter-spacing:.01em;
  cursor:pointer;
  transition:border-color .22s ease, background .22s ease, color .22s ease, transform .22s ease;
}
.fc-auth-btn .material-symbols-rounded{
  font-size:1rem;
  opacity:.78;
}
.fc-auth-btn:hover{
  color:#eef3f5;
  border-color:rgba(69,255,96,.32);
  background:rgba(69,255,96,.08);
  transform:translateY(-1px);
}
.fc-auth-request,
.fc-auth-register{
  border-color:rgba(69,255,96,.28);
  color:rgba(238,243,245,.92);
  background:rgba(69,255,96,.1);
}
.fc-auth-request:hover,
.fc-auth-register:hover{
  background:rgba(69,255,96,.16);
  border-color:rgba(69,255,96,.42);
}
.fc-auth-user{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.fc-auth-user-btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  max-width:min(220px,46vw);
  min-height:34px;
  padding:.28rem .62rem .28rem .3rem;
  border-radius:999px;
  border:1px solid rgba(238,243,245,.12);
  background:rgba(8,14,20,.52);
  backdrop-filter:blur(16px) saturate(1.08);
  -webkit-backdrop-filter:blur(16px) saturate(1.08);
  color:rgba(238,243,245,.9);
  cursor:pointer;
  transition:border-color .22s ease, background .22s ease;
}
.fc-auth-user-btn:hover,
.fc-auth-user-btn[aria-expanded="true"]{
  border-color:rgba(69,255,96,.3);
  background:rgba(69,255,96,.08);
}
.fc-auth-avatar{
  width:26px;
  height:26px;
  border-radius:999px;
  object-fit:cover;
  flex:0 0 26px;
}
.fc-auth-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.74rem;
  font-weight:650;
}
.fc-auth-chevron{
  font-size:1rem;
  opacity:.55;
}
.fc-auth-menu{
  position:absolute;
  top:calc(100% + .45rem);
  right:0;
  min-width:180px;
  padding:.35rem;
  border-radius:.9rem;
  border:1px solid rgba(238,243,245,.1);
  background:rgba(10,16,22,.94);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:0 18px 48px rgba(0,0,0,.38);
  z-index:95;
}
.fc-auth-menu-item{
  appearance:none;
  width:100%;
  display:flex;
  align-items:center;
  gap:.48rem;
  padding:.58rem .7rem;
  border:0;
  border-radius:.62rem;
  background:transparent;
  color:rgba(238,243,245,.86);
  font-size:.78rem;
  font-weight:550;
  cursor:pointer;
  text-align:left;
}
.fc-auth-menu-item .material-symbols-rounded{
  font-size:1.05rem;
  opacity:.72;
}
.fc-auth-menu-item:hover{
  background:rgba(69,255,96,.08);
  color:#eef3f5;
}
body.fl-invite-only .fc-auth-register{display:none !important}
@media (max-width:560px){
  .fc-auth-login span:not(.material-symbols-rounded),
  .fc-auth-register span:not(.material-symbols-rounded){
    display:none;
  }
  .fc-auth-btn{
    padding:.4rem .55rem;
  }
  .fc-auth-name{
    max-width:28vw;
  }
}
.fc-brand{
  position:relative;
  display:flex;
  align-items:center;
  margin-left:0;
  text-decoration:none;
  opacity:1;
  transform:translateY(0);
  filter:blur(0);
  transition:opacity .9s ease, transform .9s ease, filter .9s ease;
  transition-delay:0s;
}
/* Larger invisible hit area so the logo can reappear on hover after fading */
.fc-brand::before{
  content:"";
  position:absolute;
  inset:-1.1rem -2.4rem -1.4rem -1.1rem;
}
body.chat-open .fc-brand{
  opacity:0;
  transform:translateY(-8px);
  filter:blur(6px);
  transition-delay:2.4s;
}
body.chat-open .fc-brand:hover,
body.chat-open .fc-brand:focus-visible{
  opacity:1;
  transform:translateY(0);
  filter:blur(0);
  transition-delay:0s;
}
.fc-brand-logo{
  display:block;
  width:min(210px, 46vw);
  height:auto;
  max-height:46px;
  object-fit:contain;
  object-position:left center;
}
/* Top-right workspace orb removed — use #viewModeSwitch instead */
.fc-workspace-launch,
[data-fc-workspace]{
  display:none !important;
}

body.chat-open .utc-clock{
  display:none !important;
}
body.chat-open .chat-mini-logo{display:none !important}

body.chat-open .chat-shell{
  width:min(920px, 100%) !important;
  height:calc(100dvh - 7.6rem) !important;
  padding:4.8rem 1rem 0 !important;
}
body.chat-open.conversation-started .chat-shell{
  justify-content:flex-start !important;
}
body.chat-open .chat-list{
  width:min(860px, 100%) !important;
  padding:.4rem .2rem 1.4rem !important;
  scrollbar-width:thin;
  scrollbar-color:rgba(238,243,245,.14) transparent;
}

/* Premium input */
body.chat-open .typing-area{
  bottom:max(1.15rem, env(safe-area-inset-bottom)) !important;
  width:min(760px, calc(100% - 2rem)) !important;
  opacity:1 !important;
  filter:none !important;
}
/*
  Empty chat (no messages): keep greeting ABOVE the tubo.
  The rule above forces bottom:!important; without this override both top+bottom
  stretch the typing-area and the hero line lands on top of the input.
*/
body.chat-open.chat-input-ready:not(.conversation-started) .typing-area{
  top:calc(50% + 1.15rem) !important;
  bottom:auto !important;
  left:50% !important;
  right:auto !important;
  height:auto !important;
  width:min(760px, calc(100% - 2rem)) !important;
  transform:translateX(-50%) !important;
}
body.chat-open.chat-input-ready:not(.conversation-started) .chat-hero-greeting{
  top:calc(50% - 0.55rem) !important;
  left:50% !important;
  width:min(640px, calc(100% - 2.5rem)) !important;
  transform:translate(-50%, -100%) !important;
  min-height:0 !important;
  line-height:1.28 !important;
  z-index:81 !important;
  overflow:visible !important;
}
@media (max-width:760px){
  body.chat-open.chat-input-ready:not(.conversation-started) .typing-area{
    top:calc(50% + 0.85rem) !important;
    bottom:auto !important;
    width:min(680px, calc(100% - 1.25rem)) !important;
    transform:translateX(-50%) !important;
  }
  body.chat-open.chat-input-ready:not(.conversation-started) .chat-hero-greeting{
    top:calc(50% - 0.4rem) !important;
    font-size:clamp(1.28rem, 5.4vw, 1.72rem) !important;
  }
}
body.chat-open .typing-area .input-wrapper{
  /* Exact match to .ws-intel-shell */
  display:flex !important;
  align-items:center !important;
  height:46px !important;
  min-height:46px !important;
  max-height:46px !important;
  box-sizing:border-box !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:999px !important;
  background:#0b1820 !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  box-shadow:none !important;
  padding:0 6px 0 16px !important;
  gap:10px !important;
  overflow:hidden !important;
  transition:border-color .2s ease, background .2s ease, box-shadow .2s ease !important;
}
body.chat-open .typing-area .input-wrapper:hover{
  border-color:rgba(255,255,255,.14) !important;
  background:#0d1c25 !important;
}
body.chat-open .typing-area .input-wrapper:focus-within{
  border-color:rgba(69,255,96,.35) !important;
  background:#0d1c25 !important;
  box-shadow:0 0 0 1px rgba(69,255,96,.08) !important;
}
body.chat-open .typing-area .input-icon{display:none !important}
body.chat-open .typing-area .typing-input{
  flex:1 1 auto !important;
  min-width:0 !important;
  height:100% !important;
  color:#F4F7F8 !important;
  font:400 .84rem/1.3 Inter,Segoe UI,sans-serif !important;
  letter-spacing:-.01em !important;
  -webkit-font-smoothing:antialiased;
}
body.chat-open .typing-area .typing-input::placeholder{
  color:#7F8B93 !important;
  opacity:1 !important;
}
body.chat-open .fc-tube-actions{
  display:inline-flex;
  align-items:center;
  gap:2px;
  flex:0 0 auto;
}
body.chat-open .fc-tube-action,
body.chat-open .fc-send.send-button,
body.chat-open .send-button.fc-send{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:30px !important;
  height:30px !important;
  min-width:30px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  color:rgba(244,247,248,.42) !important;
  box-shadow:none !important;
  filter:none !important;
  transform:none !important;
  cursor:pointer;
  transition:color .2s ease, background .2s ease, transform .18s ease !important;
}
body.chat-open .fc-tube-action .material-symbols-rounded,
body.chat-open .fc-send .material-symbols-rounded{
  font-size:18px !important;
  font-variation-settings:'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 20;
}
body.chat-open .fc-tube-action:hover,
body.chat-open .fc-tube-action:focus-visible{
  color:rgba(244,247,248,.86) !important;
  background:rgba(255,255,255,.05) !important;
}
body.chat-open .fc-send.send-button,
body.chat-open .send-button.fc-send{
  background:rgba(255,255,255,.05) !important;
  color:rgba(244,247,248,.72) !important;
}
body.chat-open .input-wrapper.has-value .fc-send,
body.chat-open .fc-send:hover,
body.chat-open .fc-send:focus-visible{
  background:rgba(69,255,96,.16) !important;
  color:#45FF60 !important;
  filter:none !important;
  transform:none !important;
  box-shadow:none !important;
}
body.chat-open .fc-send:active{transform:translateY(1px) !important}
body.chat-open .fc-send .ai-star{display:none !important}
/* Theme / language corner pills hidden in chat view */
body.chat-open #cornerPrefs,
body.chat-open .corner-prefs{
  display:none !important;
}

@media (max-width:760px){
  .fc-brand-logo{width:min(168px, 52vw); max-height:40px}
  body.chat-open .chat-shell{
    padding-top:4.2rem !important;
    height:calc(100dvh - 6.8rem) !important;
  }
}
