.sidebar{width:var(--sidebar-width);height:100%;background:var(--sidebar);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0;transition:width .18s ease,transform .18s ease;z-index:20}
.sidebar.collapsed{width:0;overflow:hidden;border-right:0}
.sidebar-head{height:58px;padding:10px 10px 8px;display:flex;align-items:center;justify-content:space-between}
.brand-button{border:0;background:transparent;display:flex;align-items:center;gap:10px;padding:5px 8px;border-radius:9px;cursor:pointer}
.brand-button:hover{background:var(--hover)}
.brand-mark{width:28px;height:28px;border-radius:8px;background:#f1f1f1;color:#181818;display:grid;place-items:center;font-weight:800}
.brand-name{font-weight:650;letter-spacing:-.2px}
.round-icon-button,.topbar-icon,.tiny-icon-button,.composer-button,.composer-round-button{border:0;background:transparent;display:grid;place-items:center;cursor:pointer}
.round-icon-button{width:34px;height:34px;border-radius:8px}
.round-icon-button:hover,.topbar-icon:hover,.tiny-icon-button:hover,.composer-button:hover{background:var(--hover)}
.round-icon-button:after{content:"";width:15px;height:10px;border-top:2px solid var(--muted);border-bottom:2px solid var(--muted);box-shadow:0 4px 0 -2px var(--muted)}
.sidebar-tools,.primary-nav{padding:2px 9px}
.nav-button{width:100%;height:39px;border:0;border-radius:8px;background:transparent;display:flex;align-items:center;gap:12px;padding:0 11px;text-align:left;cursor:pointer;color:#dedede;font-size:14px}
.nav-button:hover{background:var(--hover)}
.nav-button .icon{width:19px;height:19px;display:grid;place-items:center;flex:0 0 19px;color:#d8d8d8}
.icon svg,.user-chevron svg,.brain-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.new-chat-button{margin-bottom:5px}
.updated-badge{font-size:8px;font-weight:800;letter-spacing:.35px;color:#9de1b1;border:1px solid rgba(157,225,177,.5);padding:2px 4px;border-radius:4px;margin-left:auto}
.more-dots{font-size:15px;letter-spacing:1px}
.history-section{min-height:0;flex:1;padding:11px 9px 0;display:flex;flex-direction:column}
.section-title-row{height:31px;padding:0 10px;display:flex;align-items:center;justify-content:space-between;color:#a9a9a9;font-size:12px;font-weight:600}
.tiny-icon-button{width:25px;height:25px;border-radius:6px}
.tiny-icon-button:after{content:"•••";font-size:13px;letter-spacing:2px;color:#9d9d9d}
.history-list{overflow:auto;min-height:0;padding-right:2px}
.history-list::-webkit-scrollbar{width:5px}.history-list::-webkit-scrollbar-thumb{background:#4c4c4c;border-radius:10px}
.history-item{position:relative;display:flex;align-items:center;width:100%;min-height:39px;padding:0 8px;border-radius:8px;cursor:pointer;color:#ddd;font-size:13.5px}
.history-item:hover{background:var(--hover)}
.history-item.active{background:#343434}
.history-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:4px}
.history-actions{margin-left:auto;display:none;width:27px;height:27px;border:0;border-radius:6px;background:transparent;cursor:pointer}
.history-item:hover .history-actions,.history-item.active .history-actions{display:grid;place-items:center}
.history-actions:after{content:"•••";font-size:14px;letter-spacing:1px}
.user-card{margin:7px 9px 10px;padding:8px 9px;border:0;background:transparent;border-radius:9px;display:flex;align-items:center;gap:9px;text-align:left;cursor:pointer}
.user-card:hover{background:var(--hover)}
.user-avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#4bd3bd;color:#0e2c29;font-size:11px;font-weight:800}
.user-info{display:flex;flex-direction:column;line-height:1.2;flex:1}.user-info strong{font-size:13px}.user-info small{font-size:11px;color:#aaa;margin-top:2px}
.user-chevron{width:18px;color:#999}
.floating-sidebar-button{position:fixed;left:9px;top:13px;z-index:30;width:34px;height:34px;border:0;border-radius:8px;background:#2b2b2b;display:none;cursor:pointer}
.floating-sidebar-button:after{content:"•••";font-size:14px;letter-spacing:2px;color:#ddd}
.sidebar.collapsed + .floating-sidebar-button{display:block}

/* Correção final da sidebar */
/* ============================================================
   CORREÇÃO FINAL DA SIDEBAR
   ============================================================ */

/* Remove a aparência padrão dos botões do histórico */
.history-item {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: #dedede;
    box-shadow: none;
}

.history-item:hover {
    background: #2b2b2b;
    color: #ffffff;
}

.history-item.active {
    background: #343434;
    color: #ffffff;
}

/* Garante que "Nova conversa" nunca fique branca */
.history-title {
    color: inherit;
}

/* Mantém os botões da navegação no padrão escuro */
.nav-button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: #dedede;
}

.nav-button:hover {
    background: #2b2b2b;
    color: #ffffff;
}


.history-item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:4px;flex:1}.history-item-pin{margin-left:6px}.sidebar.collapsed + .floating-sidebar-button{display:grid;place-items:center}


.lendora-more-menu{min-width:220px}.lendora-more-menu .menu-item{min-height:38px}
.lendora-area-panel{position:fixed;right:24px;top:74px;width:min(420px,calc(100vw - 32px));z-index:80;background:var(--sidebar,#252525);border:1px solid var(--border,rgba(255,255,255,.12));border-radius:16px;box-shadow:0 18px 60px rgba(0,0,0,.38);overflow:hidden}.lendora-area-panel-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border,rgba(255,255,255,.1))}.lendora-area-panel-title{display:flex;align-items:center;gap:9px;font-weight:700}.lendora-area-panel-title .icon{width:20px;height:20px;display:grid;place-items:center}.lendora-area-panel-title svg{width:18px;height:18px}.lendora-area-panel-close{width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--text,#eee);font-size:22px;cursor:pointer}.lendora-area-panel-close:hover{background:var(--hover,rgba(255,255,255,.08))}.lendora-area-panel-body{padding:16px;color:var(--text,#eee)}.lendora-area-panel-body p{margin:0;line-height:1.55;color:var(--muted,#aaa)}.lendora-area-status{margin-top:14px;padding:10px 12px;border-radius:10px;background:rgba(80,180,120,.08);border:1px solid rgba(80,180,120,.18);font-size:12px;color:#a9d9ba}


/* ============================================================
 AJUSTES VISUAIS — HISTÓRICO / FUNDO
 Somente apresentação: não altera a lógica das conversas.
 ============================================================ */
.sidebar{
  background:#000;
}
.history-section{
  padding-left:12px;
  padding-right:12px;
}
.history-list{
  padding:2px 2px 0;
}
.history-item{
  position:relative;
  justify-content:flex-start;
  min-height:42px;
  padding:0 10px;
  text-align:left;
}
.history-item-title,
.history-title{
  display:block;
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding-right:4px;
  text-align:left;
}
.history-item-pin{
  position:absolute;
  right:38px;
  margin:0;
}
.history-actions{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  margin:0;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#aaa;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease,background .12s ease,color .12s ease;
}
.history-item:hover .history-actions,
.history-item.active .history-actions,
.history-actions:focus-visible{
  opacity:1;
  pointer-events:auto;
}
.history-actions:hover{
  background:#303030;
  color:#fff;
}
.history-actions::after{
  content:"•••";
  font-size:15px;
  line-height:1;
  letter-spacing:1px;
}
