:root{
  --bg0:#071021;
  --bg1:#020409;
  --panel:rgba(15,20,30,.78);
  --panel2:rgba(20,26,38,.7);
  --card:rgba(85,92,105,.62);
  --stroke:rgba(255,255,255,.09);
  --stroke2:rgba(255,255,255,.13);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);
  --muted2:rgba(255,255,255,.46);
  --green:#0bd18b;
  --green2:#06b97a;
  --shadow:0 16px 40px rgba(0,0,0,.45);
  --r:16px;
}
*{box-sizing:border-box}
button,a,input,select,textarea{touch-action:manipulation}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:radial-gradient(1200px 700px at 60% 20%, #0b2148 0%, var(--bg0) 45%, var(--bg1) 100%);
  overflow:hidden;
}
#stars{
  position:fixed;
  inset:0;
  z-index:0;
}

.authOverlay{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(2,4,9,.7);
  backdrop-filter:blur(6px);
}
.authCard{
  width:100%;
  max-width:380px;
  background:rgba(10,14,22,.92);
  border:1px solid var(--stroke2);
  border-radius:22px;
  padding:30px 28px 28px;
  box-shadow:0 32px 64px rgba(0,0,0,.6);
  display:flex;
  flex-direction:column;
  gap:14px;
}
.authLogo{
  display:flex;
  justify-content:center;
  margin-bottom:2px;
}
.authTitle{
  text-align:center;
  font-size:22px;
  font-weight:800;
  letter-spacing:.2px;
}
.authSubtitle{
  text-align:center;
  font-size:12px;
  color:var(--muted2);
  letter-spacing:.1em;
  margin-top:-8px;
}
.authTabs{
  display:flex;
  gap:6px;
  background:rgba(0,0,0,.25);
  border:1px solid var(--stroke);
  border-radius:14px;
  padding:4px;
}
.authTab{
  flex:1;
  padding:9px 12px;
  border-radius:10px;
  border:0;
  background:transparent;
  color:var(--muted);
  font-weight:600;
  cursor:pointer;
  transition:background .18s,color .18s;
  font-size:13px;
}
.authTab.active{
  background:rgba(11,209,139,.18);
  color:var(--green);
  border:1px solid rgba(11,209,139,.25);
}
.authTab:hover:not(.active){background:rgba(255,255,255,.05);color:var(--text)}
.authForm{display:flex;flex-direction:column;gap:12px}
.authField{display:flex;flex-direction:column;gap:5px}
.authLabel{font-size:12px;color:var(--muted);font-weight:500}
.authInput{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--stroke2);
  background:rgba(0,0,0,.3);
  color:var(--text);
  font-size:14px;
  outline:none;
  transition:border-color .18s,box-shadow .18s;
}
.authInput:focus{
  border-color:rgba(11,209,139,.6);
  box-shadow:0 0 0 3px rgba(11,209,139,.1);
}
.authInput::placeholder{color:rgba(255,255,255,.3)}
.authBtn{
  width:100%;
  padding:13px 14px;
  border-radius:12px;
  border:0;
  background:linear-gradient(180deg, var(--green), var(--green2));
  color:#02130c;
  font-weight:700;
  cursor:pointer;
  font-size:14px;
  margin-top:2px;
  transition:filter .18s;
}
.authBtn:hover{filter:brightness(1.06)}
.authBtn:active{transform:translateY(1px)}
.authBtn:disabled{opacity:.55;cursor:default;transform:none}
.authError{
  padding:9px 12px;
  border-radius:10px;
  background:rgba(231,76,60,.15);
  border:1px solid rgba(231,76,60,.3);
  color:#f08080;
  font-size:13px;
}

.authRememberRow{margin-top:4px;display:flex;align-items:center}
.authRemember{display:flex;align-items:center;gap:10px;font-size:13px;opacity:.9;cursor:pointer;user-select:none}
.authRemember input{transform:scale(1.05)}

.attachDivider{height:1px;background:rgba(255,255,255,.08);margin:6px 0}
.settingActions{display:flex;gap:8px;align-items:center}
.chipBtn{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);color:#fff;padding:8px 10px;border-radius:999px;font-weight:800;cursor:pointer}
.chipBtn.active{border-color:rgba(11,209,139,.45);background:rgba(11,209,139,.12)}

.app{
  position:relative;
  z-index:1;
  height:100%;
  display:flex;
}
.sidebar{
  width:290px;
  min-width:290px;
  height:100%;
  padding:18px 16px;
  background:rgba(10,12,18,.82);
  border-right:1px solid var(--stroke);
  display:flex;
  flex-direction:column;
  gap:14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 8px;
}
.logo{
  width:34px;height:34px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:rgba(12,16,24,.75);
  border:1px solid var(--stroke);
  box-shadow:0 10px 22px rgba(0,0,0,.25);
}
.brandName{
  font-weight:700;
  letter-spacing:.2px;
}
.primaryBtn{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(11,209,139,.18);
  background:linear-gradient(180deg, var(--green), var(--green2));
  color:#02130c;
  font-weight:700;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  box-shadow:0 18px 36px rgba(0,0,0,.35);
  transform:translateZ(0);
}
.primaryBtn:hover{filter:saturate(1.1) brightness(1.03)}
.primaryBtn:active{transform:translateY(1px)}
.plus{
  font-size:18px;
  line-height:18px;
}
.sectionTitle{
  font-size:12px;
  letter-spacing:.12em;
  color:var(--muted2);
  margin-top:2px;
}
.sessions{
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
  flex:1;
  padding-right:4px;
}
.sessions::-webkit-scrollbar{width:10px}
.sessions::-webkit-scrollbar-thumb{background:rgba(255,255,255,.07);border-radius:20px;border:3px solid transparent;background-clip:padding-box}
.sessionItem{
  width:100%;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(12,16,24,.55);
  padding:10px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
}
.sessionItem.active{
  background:rgba(12,16,24,.82);
  border-color:rgba(11,209,139,.22);
}
.sessionLeft{display:flex;align-items:flex-start;gap:10px;min-width:0;flex:1}
.sessionDot{
  width:10px;height:10px;border-radius:3px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.18);
}
.sessionItem.active .sessionDot{background:var(--green);border-color:var(--green2)}
.delBtn{
  width:30px;height:30px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.12);
  color:rgba(255,255,255,.72);
  cursor:pointer;
  display:grid;
  place-items:center;
  flex-shrink:0;
}
.delBtn:hover{border-color:rgba(255,255,255,.18);background:rgba(0,0,0,.18)}
.sidebarFooter{margin-top:auto;display:flex;flex-direction:column;gap:6px}
.userInfo{
  font-size:12px;
  color:var(--muted2);
  padding:4px 10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ghostBtn{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(12,16,24,.55);
  color:rgba(255,255,255,.75);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:flex-start;
}
.ghostBtn:hover{border-color:rgba(255,255,255,.16)}

.main{flex:1;display:flex;flex-direction:column;height:100%;min-width:0}
.topbar{
  height:74px;
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.topTitle{font-size:20px;font-weight:800;letter-spacing:.2px}
.topSubtitle{font-size:12px;color:var(--muted2);letter-spacing:.12em;margin-top:2px}
.headerBtn{
  border-radius:14px;
  padding:10px 14px;
  border:1px solid var(--stroke2);
  background:rgba(255,255,255,.1);
  color:rgba(255,255,255,.9);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  box-shadow:0 16px 34px rgba(0,0,0,.25);
  flex-shrink:0;
}
.headerBtn:hover{background:rgba(255,255,255,.14)}

.content{flex:1;position:relative;overflow:hidden}
.welcome{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-align:center;
  padding:24px;
}
.welcomeIcon{
  width:54px;height:54px;
  border-radius:16px;
  background:rgba(255,255,255,.08);
  border:1px solid var(--stroke);
  display:grid;
  place-items:center;
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
}
.welcomeTitle{font-size:26px;font-weight:800}
.welcomeText{max-width:520px;color:var(--muted);line-height:1.55}

.chat{
  position:absolute;
  inset:0;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:0 18px 18px 18px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.chat::-webkit-scrollbar{width:10px}
.chat::-webkit-scrollbar-thumb{background:rgba(255,255,255,.06);border-radius:20px;border:3px solid transparent;background-clip:padding-box}
.messages{width:100%;max-width:860px;padding-top:10px;display:flex;flex-direction:column}
.msgRow{display:flex;flex-direction:column;gap:8px;margin-bottom:14px;animation:fadeIn .25s ease-out}
.msgMeta{font-size:12px;color:rgba(255,255,255,.48)}
.userBubble{
  align-self:flex-end;
  max-width:min(680px,88%);
  background:rgba(11,209,139,.16);
  border:1px solid rgba(11,209,139,.22);
  padding:10px 14px;
  border-radius:14px;
  border-bottom-right-radius:4px;
  color:rgba(255,255,255,.88);
  line-height:1.5;
  word-break:break-word;
  display:flex;flex-direction:column;gap:8px;
}
.msgThumb{max-width:220px;max-height:180px;border-radius:10px;object-fit:cover;border:1px solid rgba(255,255,255,.15);display:block}
.noteCard{
  align-self:flex-start;
  width:100%;
  max-width:860px;
  border-radius:18px;
  border-bottom-left-radius:4px;
  background:var(--card);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--shadow);
  backdrop-filter: blur(8px);
  padding:18px 18px;
}
.noteText{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:15px;
  line-height:1.7;
  white-space:pre-wrap;
  color:rgba(255,255,255,.92);
  word-break:break-word;
}
.noteText b{color:var(--green);font-weight:600}
.noteText strong{color:var(--text);font-weight:700}
.prontuarioSection{
  border-left:3px solid var(--green);
  padding:4px 0 4px 10px;
  margin:8px 0 2px;
  background:rgba(11,209,139,.07);
  border-radius:0 4px 4px 0;
  display:block;
}
.sectionLabel{color:var(--green);font-weight:700;font-size:1em;letter-spacing:.03em}
.noteText em{font-style:italic;color:rgba(255,255,255,.82)}
.noteText code{
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.1);
  border-radius:4px;
  padding:1px 6px;
  font-size:.88em;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Courier New",monospace;
}
.noteText pre{
  background:rgba(0,0,0,.38);
  border:1px solid rgba(255,255,255,.1);
  border-radius:8px;
  padding:12px 14px;
  overflow-x:auto;
  margin:8px 0;
  white-space:pre;
}
.noteText pre code{background:none;border:none;padding:0;font-size:.85em}
.codeBlock{
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  overflow:hidden;
  margin:8px 0;
}
.codeBlock pre{
  border-radius:0;
  border:none;
  margin:0;
}
.codeBlockHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:7px 12px;
  background:rgba(255,255,255,.04);
  border-bottom:1px solid rgba(255,255,255,.08);
  gap:10px;
}
.codeLangBadge{
  font-size:11px;
  font-weight:700;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  color:var(--green);
  letter-spacing:.04em;
}
.codeDownloadBtn{
  display:inline-flex;align-items:center;gap:4px;
  padding:4px 10px;border-radius:7px;
  border:1px solid rgba(11,209,139,.35);
  background:rgba(11,209,139,.1);
  color:#0bd18b;font-size:11px;font-weight:700;
  cursor:pointer;white-space:nowrap;flex-shrink:0;
  transition:background .15s,border-color .15s;
}
.codeDownloadBtn:hover{background:rgba(11,209,139,.22);border-color:rgba(11,209,139,.6)}
.noteActions{display:flex;align-items:center;gap:8px;margin-top:14px;flex-wrap:wrap}
.moreActionsWrap{position:relative}
.moreDotsBtn{padding:7px 10px!important;gap:0!important}
.moreDropdown{
  position:absolute;
  bottom:calc(100% + 6px);
  left:0;
  background:#0d1017;
  border:1px solid rgba(255,255,255,.13);
  border-radius:12px;
  padding:5px;
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:158px;
  z-index:200;
  box-shadow:0 8px 32px rgba(0,0,0,.55);
  animation:fadeIn .15s ease;
}
.moreItem{
  width:100%;
  justify-content:flex-start!important;
  border-radius:8px!important;
  font-size:12px!important;
  padding:7px 10px!important;
  border-color:transparent!important;
  background:transparent!important;
}
.moreItem:hover{background:rgba(255,255,255,.07)!important;border-color:transparent!important}
.smallBtn{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.18);
  color:rgba(255,255,255,.82);
  cursor:pointer;
  font-size:13px;
  line-height:1;
}
.smallBtn:hover{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.25)}
.smallBtn:disabled{opacity:.5;cursor:default}
.reviewBtns{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.reviewBtnYes{border-color:rgba(60,220,100,.4)!important;color:var(--green)!important}
.reviewBtnYes:hover{background:rgba(60,220,100,.1)!important}

.composer{padding:0 18px 18px 18px;display:flex;flex-direction:column;align-items:center;gap:10px}
.composerInner{
  width:100%;
  max-width:860px;
  min-height:64px;
  border-radius:18px;
  background:rgba(0,0,0,.25);
  border:1px solid var(--stroke);
  box-shadow:0 22px 44px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 12px;
}
.iconBtn{
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  cursor:pointer;
  display:grid;
  place-items:center;
  flex-shrink:0;
}
.iconBtn:hover{background:rgba(255,255,255,.09)}
.micBtn{
  width:44px;height:44px;
  border-radius:14px;
  border:0;
  background:linear-gradient(180deg, var(--green), var(--green2));
  cursor:pointer;
  display:grid;
  place-items:center;
  box-shadow:0 16px 30px rgba(0,0,0,.25);
  flex-shrink:0;
}
.micBtn.recording{background:linear-gradient(180deg, rgba(255,92,92,.95), rgba(210,40,40,.95))!important}

.inputWrap{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.textInput{
  width:100%;
  height:36px;
  border:0;
  outline:none;
  background:transparent;
  color:rgba(255,255,255,.88);
  font-size:14px;
  font-family:inherit;
  line-height:1.6;
  resize:none;
  overflow-y:auto;
  scrollbar-width:none;
}
.textInput::-webkit-scrollbar{display:none}
.textInput::placeholder{color:rgba(255,255,255,.45)}
.preview{display:flex;gap:10px;align-items:center}
.previewImg{
  width:42px;height:42px;border-radius:12px;object-fit:cover;border:1px solid rgba(255,255,255,.14)
}
.previewPill{
  padding:8px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.18);color:rgba(255,255,255,.75);font-size:12px
}
.previewX{
  width:30px;height:30px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.15);color:rgba(255,255,255,.85);cursor:pointer
}

.previewFile{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.previewFileIcon{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  display:grid;
  place-items:center;
  color:rgba(255,255,255,.9);
  flex-shrink:0;
}
.previewFileMeta{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.previewFileName{
  font-size:12px;
  color:rgba(255,255,255,.9);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:220px;
}
.previewFileType{
  font-size:11px;
  color:rgba(255,255,255,.55);
  text-transform:uppercase;
  letter-spacing:.05em;
}
.userFilePill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  padding:8px 12px;
  margin-bottom:8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.88);
  font-size:12px;
}
.userFilePill svg{
  flex-shrink:0;
}
.attachItemConsulta{color:var(--green)}
.attachItemConsulta:hover{background:rgba(255,255,255,.06)}
.osintModeBadge{
  background:rgba(11,209,139,.08);
  border-color:rgba(11,209,139,.22);
  color:var(--green);
}
[data-theme="hack"] .attachItemConsulta{color:#00ff41}
[data-theme="hack"] .osintModeBadge{background:rgba(0,255,65,.08);border-color:rgba(0,255,65,.22);color:#00ff41}
[data-theme="ai"] .osintModeBadge{background:rgba(129,140,248,.1);border-color:rgba(129,140,248,.24);color:#a5b4fc}
[data-theme="love"] .osintModeBadge{background:rgba(255,100,160,.1);border-color:rgba(255,100,160,.24);color:#ff6b9d}
[data-theme="engineer"] .osintModeBadge{background:rgba(212,175,55,.1);border-color:rgba(212,175,55,.24);color:#d4af37}
[data-theme="lawyer"] .osintModeBadge{background:rgba(245,197,24,.1);border-color:rgba(245,197,24,.24);color:#f5c518}
.sendBtn{
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  cursor:pointer;
  display:grid;
  place-items:center;
  flex-shrink:0;
}
.sendBtn:hover{background:rgba(255,255,255,.12)}
.status{font-size:12px;color:rgba(255,255,255,.58);padding-left:6px;min-height:18px;width:100%;max-width:860px}
.maintenanceBanner{
  display:flex;align-items:center;gap:8px;
  padding:9px 14px;border-radius:12px;
  background:rgba(245,158,11,.1);
  border:1px solid rgba(245,158,11,.35);
  color:#fbbf24;font-size:13px;font-weight:700;
  animation:fadeIn .3s ease;
  width:100%;max-width:860px;
}
.maintenanceBanner svg{flex-shrink:0;stroke:#fbbf24}
.maintDots span{animation:maintBlink 1.4s infinite;opacity:0}
.maintDots span:nth-child(2){animation-delay:.3s}
.maintDots span:nth-child(3){animation-delay:.6s}
@keyframes maintBlink{0%,80%,100%{opacity:0}40%{opacity:1}}
.sendBtn:disabled{opacity:.4;cursor:not-allowed}
.hidden{display:none!important}

@keyframes fadeIn{from{opacity:.01;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

.engineStatus{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 12px;
  border-radius:12px;
  background:rgba(0,0,0,.2);
  border:1px solid var(--stroke);
  font-size:12px;
  white-space:nowrap;
  flex-shrink:0;
}
.statusDot{
  width:8px;height:8px;border-radius:50%;flex-shrink:0;
}
.statusDot.online{background:var(--green);box-shadow:0 0 6px rgba(11,209,139,.5)}
.statusDot.offline{background:#e74c3c;box-shadow:0 0 6px rgba(231,76,60,.4)}
.statusDot.checking{background:#f1c40f;animation:blink 1s infinite}
.statusLabel{color:var(--muted)}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.4}}

.menuBtn{
  display:none;
  width:40px;height:40px;
  border-radius:12px;
  border:1px solid var(--stroke2);
  background:rgba(255,255,255,.06);
  cursor:pointer;
  place-items:center;
  flex-shrink:0;
}
.menuBtn:hover{background:rgba(255,255,255,.1)}
.sidebarOverlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:9;
  background:rgba(0,0,0,.55);
}
.sidebarOverlay.show{display:block}

.titleWrap{flex:1;min-width:0}

@media (max-width:980px){
  .sidebar{width:260px;min-width:260px}
  .messages{max-width:720px}
}
@media (max-width:820px){
  body{overflow:hidden}
  .menuBtn{display:grid}
  .sidebar{
    position:fixed;
    left:0;top:0;bottom:0;
    z-index:10;
    width:280px;min-width:280px;
    transform:translateX(-100%);
    transition:transform .25s ease;
  }
  .sidebar.open{transform:translateX(0)}
  .welcomeTitle{font-size:22px}
  .engineStatus .statusLabel{display:none}
}
@media (max-width:480px){
  .authCard{padding:24px 18px 20px}
  .topbar{padding:12px 14px}
  .composer{padding:0 12px calc(14px + env(safe-area-inset-bottom)) 12px}
  .textInput{font-size:16px}
}

[data-theme="hack"]{
  --bg0:#000800;
  --bg1:#000200;
  --panel:rgba(0,10,2,.9);
  --panel2:rgba(0,8,2,.85);
  --card:rgba(0,22,6,.8);
  --stroke:rgba(0,255,65,.1);
  --stroke2:rgba(0,255,65,.2);
  --text:rgba(0,255,65,.95);
  --muted:rgba(0,255,65,.65);
  --muted2:rgba(0,255,65,.42);
  --green:#00ff41;
  --green2:#00cc34;
  --shadow:0 16px 40px rgba(0,80,20,.2);
}
[data-theme="hack"] body{
  background:#000800;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}
[data-theme="hack"] .authCard{
  background:rgba(0,10,3,.96);
  border-color:rgba(0,255,65,.2);
}
[data-theme="hack"] .authInput{
  background:rgba(0,8,2,.5);
  border-color:rgba(0,255,65,.2);
  color:rgba(0,255,65,.9);
}
[data-theme="hack"] .authInput::placeholder{color:rgba(0,255,65,.3)}
[data-theme="hack"] .authInput:focus{
  border-color:rgba(0,255,65,.6);
  box-shadow:0 0 0 3px rgba(0,255,65,.1);
}
[data-theme="hack"] .authTab.active{
  background:rgba(0,255,65,.14);
  color:#00ff41;
  border-color:rgba(0,255,65,.25);
}
[data-theme="hack"] .authBtn{
  background:linear-gradient(180deg,rgba(0,255,65,.9),rgba(0,180,45,.9));
  color:#000800;
}
[data-theme="hack"] .sidebar{background:rgba(0,8,2,.9);border-color:rgba(0,255,65,.1)}
[data-theme="hack"] .primaryBtn{
  background:linear-gradient(180deg,rgba(0,255,65,.9),rgba(0,180,45,.9));
  color:#000800;
  border-color:rgba(0,255,65,.22);
}
[data-theme="hack"] .micBtn{
  background:linear-gradient(180deg,rgba(0,255,65,.9),rgba(0,180,45,.9));
}
[data-theme="hack"] .noteCard{
  background:rgba(0,20,6,.8);
  border-color:rgba(0,255,65,.15);
}
[data-theme="hack"] .userBubble{
  background:rgba(0,255,65,.1);
  border-color:rgba(0,255,65,.2);
  color:rgba(0,255,65,.9);
}
[data-theme="hack"] .sessionItem.active{border-color:rgba(0,255,65,.25)}
[data-theme="hack"] .sessionItem.active .sessionDot{background:#00ff41;border-color:#00cc34}
[data-theme="hack"] .statusDot.online{background:#00ff41;box-shadow:0 0 8px rgba(0,255,65,.7)}
[data-theme="hack"] .composerInner{background:rgba(0,8,2,.4);border-color:rgba(0,255,65,.12)}
[data-theme="hack"] .textInput{color:rgba(0,255,65,.9)}
[data-theme="hack"] .textInput::placeholder{color:rgba(0,255,65,.3)}
[data-theme="hack"] .iconBtn{background:rgba(0,15,4,.5);border-color:rgba(0,255,65,.12)}
[data-theme="hack"] .sendBtn{background:rgba(0,15,4,.5);border-color:rgba(0,255,65,.14)}
[data-theme="hack"] .ghostBtn{background:rgba(0,12,3,.5);border-color:rgba(0,255,65,.1)}
[data-theme="hack"] .headerBtn{background:rgba(0,255,65,.1);border-color:rgba(0,255,65,.2)}
[data-theme="hack"] .engineStatus{background:rgba(0,10,2,.3);border-color:rgba(0,255,65,.12)}
[data-theme="hack"] .welcomeIcon{background:rgba(0,20,6,.5);border-color:rgba(0,255,65,.15)}
[data-theme="hack"] .sessionItem{background:rgba(0,12,3,.5);border-color:rgba(0,255,65,.1)}
[data-theme="hack"] .noteText{color:rgba(0,255,65,.88)}
[data-theme="hack"] .smallBtn{background:rgba(0,12,3,.4);border-color:rgba(0,255,65,.15);color:rgba(0,255,65,.8)}
[data-theme="hack"] .authOverlay{background:rgba(0,4,1,.75)}

[data-theme="ai"]{
  --bg0:#070714;
  --bg1:#030308;
  --panel:rgba(10,10,30,.85);
  --panel2:rgba(8,8,25,.8);
  --card:rgba(40,40,85,.68);
  --stroke:rgba(130,100,255,.1);
  --stroke2:rgba(150,120,255,.18);
  --text:rgba(255,255,255,.92);
  --muted:rgba(200,190,255,.65);
  --muted2:rgba(180,170,255,.45);
  --green:#818cf8;
  --green2:#6366f1;
  --shadow:0 16px 40px rgba(0,0,0,.45);
}
[data-theme="ai"] body{
  background:radial-gradient(1200px 700px at 60% 20%,#0f0f3a 0%,#070714 45%,#030308 100%);
}
[data-theme="ai"] .authCard{
  background:rgba(8,8,25,.95);
  border-color:rgba(130,100,255,.2);
}
[data-theme="ai"] .authInput:focus{
  border-color:rgba(130,100,255,.6);
  box-shadow:0 0 0 3px rgba(99,102,241,.1);
}
[data-theme="ai"] .authTab.active{
  background:rgba(99,102,241,.18);
  color:#818cf8;
  border-color:rgba(99,102,241,.25);
}
[data-theme="ai"] .authBtn{
  background:linear-gradient(180deg,rgba(129,140,248,.95),rgba(99,102,241,.95));
  color:#fff;
}
[data-theme="ai"] .primaryBtn{
  background:linear-gradient(180deg,rgba(129,140,248,.95),rgba(99,102,241,.95));
  color:#fff;
  border-color:rgba(129,140,248,.25);
}
[data-theme="ai"] .micBtn{
  background:linear-gradient(180deg,rgba(129,140,248,.95),rgba(99,102,241,.95));
}
[data-theme="ai"] .userBubble{
  background:rgba(99,102,241,.14);
  border-color:rgba(99,102,241,.22);
}
[data-theme="ai"] .sessionItem.active{border-color:rgba(129,140,248,.25)}
[data-theme="ai"] .sessionItem.active .sessionDot{background:#818cf8;border-color:#6366f1}
[data-theme="ai"] .statusDot.online{background:#818cf8;box-shadow:0 0 6px rgba(129,140,248,.5)}
[data-theme="ai"] .sidebar{background:rgba(8,8,25,.88);border-color:rgba(130,100,255,.1)}
[data-theme="ai"] .composerInner{background:rgba(5,5,18,.4)}

.modalOverlay{
  position:fixed;
  inset:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(0,0,0,.65);
  backdrop-filter:blur(8px);
}
.modalCard{
  width:100%;
  max-width:520px;
  background:rgba(10,14,22,.97);
  border:1px solid var(--stroke2);
  border-radius:22px;
  padding:28px 28px 24px;
  box-shadow:0 32px 64px rgba(0,0,0,.7);
  display:flex;
  flex-direction:column;
  gap:22px;
  max-height:90vh;
  overflow-y:auto;
}
.modalCard::-webkit-scrollbar{width:6px}
.modalCard::-webkit-scrollbar-thumb{background:rgba(255,255,255,.1);border-radius:10px}
.modalHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.modalTitle{
  font-size:18px;
  font-weight:800;
  letter-spacing:.2px;
}
.modalClose{
  width:32px;height:32px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:14px;
}
.modalClose:hover{background:rgba(255,255,255,.12)}
.settingsSection{display:flex;flex-direction:column;gap:14px}
.settingsSectionTitle{
  font-size:11px;
  letter-spacing:.14em;
  color:var(--muted2);
  font-weight:600;
}
.themeGrid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.themeCard{
  border-radius:16px;
  border:2px solid var(--stroke);
  background:rgba(255,255,255,.04);
  padding:14px 10px 12px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  transition:border-color .18s,background .18s;
}
.themeCard:hover{border-color:var(--stroke2);background:rgba(255,255,255,.06)}
.themeCard.active{border-color:var(--green);background:rgba(255,255,255,.06)}
.themePreview{
  width:100%;
  height:58px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
}
.previewMedic{
  background:linear-gradient(135deg,#071021 0%,#0b2148 100%);
  border:1px solid rgba(11,209,139,.2);
}
.prevDot{
  width:10px;height:10px;border-radius:50%;
  background:#0bd18b;
  box-shadow:0 0 10px rgba(11,209,139,.6);
  position:absolute;top:10px;left:10px;
}
.prevLines{
  display:flex;flex-direction:column;gap:5px;
  padding-left:28px;width:100%;
}
.prevLine{height:3px;background:rgba(11,209,139,.3);border-radius:3px;width:70%}
.prevLine.short{width:48%}
.previewHack{
  background:#000800;
  border:1px solid rgba(0,255,65,.2);
}
.prevMatrix{
  font-family:monospace;font-size:11px;
  color:#00ff41;line-height:1.4;
  text-shadow:0 0 6px rgba(0,255,65,.8);
  letter-spacing:2px;
}
.previewAI{
  background:linear-gradient(135deg,#070714 0%,#0f0f3a 100%);
  border:1px solid rgba(129,140,248,.2);
}
.prevOrb{
  width:28px;height:28px;border-radius:50%;
  background:radial-gradient(circle,rgba(129,140,248,.9) 0%,rgba(99,102,241,.4) 60%,transparent 100%);
  box-shadow:0 0 18px rgba(129,140,248,.5);
}
.previewLove{
  background:linear-gradient(135deg,#1a0a14 0%,#2d0a1a 100%);
  border:1px solid rgba(255,100,160,.22);
}
.prevHeart{
  font-size:24px;
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  filter:drop-shadow(0 0 6px rgba(255,100,160,.7));
  animation:heartbeat .9s ease-in-out infinite;
}
@keyframes heartbeat{
  0%,100%{transform:translate(-50%,-50%) scale(1)}
  50%{transform:translate(-50%,-50%) scale(1.18)}
}
.themeGrid{grid-template-columns:repeat(2,1fr)}
@media(min-width:520px){.themeGrid{grid-template-columns:repeat(4,1fr)}}
.themeCardName{font-size:13px;font-weight:700;color:var(--text)}
.themeCardDesc{font-size:11px;color:var(--muted2);text-align:center}
.settingRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.03);
}
.settingInfo{display:flex;flex-direction:column;gap:4px;flex:1}
.settingName{font-size:14px;font-weight:600;color:var(--text)}
.settingDesc{font-size:12px;color:var(--muted2)}
.toggle{
  position:relative;
  width:46px;height:26px;
  flex-shrink:0;cursor:pointer;
}
.toggle input{opacity:0;width:0;height:0;position:absolute}
.toggleSlider{
  position:absolute;inset:0;
  background:rgba(255,255,255,.15);
  border-radius:13px;
  border:1px solid rgba(255,255,255,.12);
  transition:background .2s;
}
.toggleSlider::before{
  content:'';position:absolute;
  left:3px;top:50%;transform:translateY(-50%);
  width:18px;height:18px;border-radius:50%;
  background:rgba(255,255,255,.7);
  transition:left .2s,background .2s;
}
.toggle input:checked + .toggleSlider{background:var(--green);border-color:var(--green2)}
.toggle input:checked + .toggleSlider::before{left:23px;background:#fff}

.attachWrap{position:relative;flex-shrink:0}
.attachMenu{
  position:absolute;
  bottom:calc(100% + 10px);
  left:0;
  min-width:180px;
  background:rgba(10,14,22,.97);
  border:1px solid var(--stroke2);
  border-radius:14px;
  padding:6px;
  display:flex;
  flex-direction:column;
  gap:2px;
  box-shadow:0 16px 44px rgba(0,0,0,.6);
  backdrop-filter:blur(14px);
  z-index:50;
  animation:fadeIn .15s ease;
}
.attachItem{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 13px;
  border-radius:10px;
  border:0;
  background:transparent;
  color:var(--text);
  cursor:pointer;
  font-size:13px;
  white-space:nowrap;
  text-align:left;
  width:100%;
  transition:background .14s;
}
.attachItem:hover{background:rgba(255,255,255,.07)}
.attachItemGen{color:var(--green)}
.attachItemGen:hover{background:rgba(255,255,255,.06)}

.badgeRow{display:flex;flex-wrap:wrap;gap:6px;align-items:center;width:100%;max-width:860px;margin-bottom:-6px;padding:0 2px}
.badgeRow .genModeBadge{margin-bottom:0}
.genModeBadge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:4px 8px 4px 10px;
  border-radius:8px;
  background:rgba(129,140,248,.12);
  border:1px solid rgba(129,140,248,.25);
  font-size:12px;
  color:var(--green);
  width:fit-content;
}
.genModeBadge button{
  border:0;background:none;
  color:var(--muted2);cursor:pointer;
  font-size:13px;padding:0 2px;line-height:1;
}
.genModeBadge button:hover{color:var(--text)}

.imgCard{
  align-self:flex-start;
  max-width:min(420px,90%);
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.3);
  box-shadow:var(--shadow);
}
.imgCard img{width:100%;display:block}
.imgCaption{
  padding:8px 14px;
  font-size:12px;
  color:var(--muted);
  font-style:italic;
  line-height:1.4;
}
.imgCard .noteActions{padding:0 12px 12px}

[data-theme="hack"] .attachMenu{background:rgba(0,10,3,.97);border-color:rgba(0,255,65,.18)}
[data-theme="hack"] .attachItem{color:rgba(0,255,65,.9)}
[data-theme="hack"] .attachItem:hover{background:rgba(0,255,65,.07)}
[data-theme="hack"] .attachItemGen{color:#00ff41}
[data-theme="hack"] .genModeBadge{background:rgba(0,255,65,.08);border-color:rgba(0,255,65,.22);color:#00ff41}
[data-theme="hack"] .imgCard{border-color:rgba(0,255,65,.15)}
[data-theme="ai"] .genModeBadge{background:rgba(99,102,241,.1);border-color:rgba(129,140,248,.22)}

[data-theme="love"]{
  --bg0:#1a0a14;
  --bg1:#0d0509;
  --panel:rgba(28,10,20,.78);
  --panel2:rgba(35,12,26,.7);
  --card:rgba(120,60,90,.62);
  --stroke:rgba(255,100,160,.1);
  --stroke2:rgba(255,100,160,.18);
  --text:rgba(255,240,248,.92);
  --muted:rgba(255,200,230,.62);
  --muted2:rgba(255,180,220,.46);
  --green:#ff6b9d;
  --green2:#e0457b;
  --shadow:0 16px 40px rgba(180,20,80,.2);
  --r:16px;
}
[data-theme="love"] body{
  background:radial-gradient(1200px 700px at 60% 20%,#2d0a1a 0%,#1a0a14 45%,#0d0509 100%);
}
[data-theme="love"] .authCard{
  background:rgba(25,8,18,.96);
  border-color:rgba(255,100,160,.2);
}
[data-theme="love"] .authInput{
  background:rgba(20,5,14,.5);
  border-color:rgba(255,100,160,.2);
  color:rgba(255,210,235,.9);
}
[data-theme="love"] .authInput::placeholder{color:rgba(255,150,200,.3)}
[data-theme="love"] .authInput:focus{
  border-color:rgba(255,100,160,.6);
  box-shadow:0 0 0 3px rgba(255,100,160,.1);
}
[data-theme="love"] .authTab.active{
  background:rgba(255,100,160,.18);
  color:#ff6b9d;
  border-color:rgba(255,100,160,.28);
}
[data-theme="love"] .authBtn{
  background:linear-gradient(180deg,#ff6b9d,#e0457b);
  color:#fff;
}
[data-theme="love"] .sidebar{background:rgba(22,6,16,.9);border-color:rgba(255,100,160,.1)}
[data-theme="love"] .primaryBtn{
  background:linear-gradient(180deg,#ff6b9d,#e0457b);
  color:#fff;
  border-color:rgba(255,100,160,.25);
}
[data-theme="love"] .micBtn{
  background:linear-gradient(180deg,#ff6b9d,#e0457b);
}
[data-theme="love"] .noteCard{
  background:rgba(28,6,18,.8);
  border-color:rgba(255,100,160,.15);
}
[data-theme="love"] .userBubble{
  background:rgba(255,100,160,.12);
  border-color:rgba(255,100,160,.22);
  color:rgba(255,220,238,.9);
}
[data-theme="love"] .sessionItem.active{border-color:rgba(255,100,160,.28)}
[data-theme="love"] .sessionItem.active .sessionDot{background:#ff6b9d;border-color:#e0457b}
[data-theme="love"] .statusDot.online{background:#ff6b9d;box-shadow:0 0 6px rgba(255,100,160,.6)}
[data-theme="love"] .composerInner{background:rgba(18,4,12,.4);border-color:rgba(255,100,160,.12)}
[data-theme="love"] .textInput{color:rgba(255,220,238,.9)}
[data-theme="love"] .textInput::placeholder{color:rgba(255,150,200,.35)}
[data-theme="love"] .iconBtn{background:rgba(20,5,14,.5);border-color:rgba(255,100,160,.12)}
[data-theme="love"] .sendBtn{background:rgba(20,5,14,.5);border-color:rgba(255,100,160,.14)}
[data-theme="love"] .ghostBtn{background:rgba(18,4,12,.5);border-color:rgba(255,100,160,.1)}
[data-theme="love"] .headerBtn{background:rgba(255,100,160,.12);border-color:rgba(255,100,160,.22)}
[data-theme="love"] .engineStatus{background:rgba(20,5,14,.3);border-color:rgba(255,100,160,.12)}
[data-theme="love"] .welcomeIcon{background:rgba(28,6,18,.5);border-color:rgba(255,100,160,.15)}
[data-theme="love"] .sessionItem{background:rgba(22,5,15,.5);border-color:rgba(255,100,160,.1)}
[data-theme="love"] .smallBtn{background:rgba(22,5,14,.4);border-color:rgba(255,100,160,.18);color:rgba(255,160,200,.85)}
[data-theme="love"] .authOverlay{background:rgba(10,3,7,.75)}
[data-theme="love"] .attachMenu{background:rgba(22,5,15,.97);border-color:rgba(255,100,160,.18)}
[data-theme="love"] .attachItem{color:rgba(255,200,230,.9)}
[data-theme="love"] .attachItem:hover{background:rgba(255,100,160,.07)}
[data-theme="love"] .attachItemGen{color:#ff6b9d}
[data-theme="love"] .genModeBadge{background:rgba(255,100,160,.1);border-color:rgba(255,100,160,.24);color:#ff6b9d}
[data-theme="love"] .imgCard{border-color:rgba(255,100,160,.15)}
[data-theme="love"] .noteText{color:rgba(255,230,245,.9)}

/* ─── Engineer Theme ─────────────────────────────────────── */
[data-theme="engineer"]{
  --green:#d4af37;
  --green2:#8b6914;
  --stroke:rgba(212,175,55,.14);
  --stroke2:rgba(212,175,55,.22);
  --bg0:#0a0800;
  --bg1:#050300;
}
[data-theme="engineer"] body{background:radial-gradient(1200px 700px at 60% 20%,#1a1200 0%,#0a0800 45%,#050300 100%)}
[data-theme="engineer"] .iconBtn{
  background:linear-gradient(145deg,#2e2a20,#1a1710);
  border-color:rgba(212,175,55,.25);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 2px 5px rgba(0,0,0,.5);
}
[data-theme="engineer"] .iconBtn:hover{background:linear-gradient(145deg,#3a3520,#232010)}
[data-theme="engineer"] .micBtn{
  background:linear-gradient(145deg,#c8a22e,#7a5c0a)!important;
  border:1px solid rgba(212,175,55,.5);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 4px 12px rgba(212,175,55,.3);
}
[data-theme="engineer"] .sendBtn{
  background:linear-gradient(145deg,#d4af37,#8b6914);
  border:1px solid rgba(212,175,55,.55);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 4px 12px rgba(212,175,55,.35);
}
[data-theme="engineer"] .sendBtn:hover{background:linear-gradient(145deg,#e0c050,#9b7a22)}
[data-theme="engineer"] .primaryBtn{
  background:linear-gradient(145deg,#c8a22e,#7a5c0a);
  border:1px solid rgba(212,175,55,.4);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 3px 10px rgba(212,175,55,.25);
}
[data-theme="engineer"] .chipBtn{
  background:linear-gradient(145deg,#2a2618,#1a1710);
  border:1px solid rgba(212,175,55,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 1px 4px rgba(0,0,0,.4);
  color:rgba(212,175,55,.8);
}
[data-theme="engineer"] .chipBtn.active{
  background:linear-gradient(145deg,#d4af37,#8b6914);
  border-color:rgba(212,175,55,.7);
  color:#000;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 2px 8px rgba(212,175,55,.4);
}
[data-theme="engineer"] .chipBtn:hover:not(.active){background:linear-gradient(145deg,#322e1e,#201d12)}
[data-theme="engineer"] .userBubble{background:rgba(212,175,55,.1);border-color:rgba(212,175,55,.2);color:rgba(255,235,150,.9)}
[data-theme="engineer"] .composerInner{background:rgba(10,8,0,.5);border-color:rgba(212,175,55,.12);box-shadow:0 22px 44px rgba(0,0,0,.6),0 0 40px rgba(212,175,55,.04)}
[data-theme="engineer"] .textInput{color:rgba(255,235,150,.9)}
[data-theme="engineer"] .textInput::placeholder{color:rgba(212,175,55,.3)}
[data-theme="engineer"] .sidebar{background:rgba(10,8,0,.9);border-color:rgba(212,175,55,.08)}
[data-theme="engineer"] .sessionItem{background:rgba(20,15,0,.5);border-color:rgba(212,175,55,.08)}
[data-theme="engineer"] .sessionItem.active{border-color:rgba(212,175,55,.3)}
[data-theme="engineer"] .sessionItem.active .sessionDot{background:#d4af37;border-color:#8b6914}
[data-theme="engineer"] .statusDot.online{background:#d4af37;box-shadow:0 0 8px rgba(212,175,55,.7)}
[data-theme="engineer"] .headerBtn{background:rgba(212,175,55,.1);border-color:rgba(212,175,55,.2)}
[data-theme="engineer"] .topbar{background:rgba(5,3,0,.7);border-color:rgba(212,175,55,.08)}
[data-theme="engineer"] .attachMenu{background:rgba(15,12,0,.97);border-color:rgba(212,175,55,.2)}
[data-theme="engineer"] .attachItem{color:rgba(255,225,120,.9)}
[data-theme="engineer"] .attachItem:hover{background:rgba(212,175,55,.07)}
[data-theme="engineer"] .genModeBadge{background:rgba(212,175,55,.1);border-color:rgba(212,175,55,.25);color:#d4af37}
[data-theme="engineer"] .engineStatus{background:rgba(15,12,0,.3);border-color:rgba(212,175,55,.1)}
[data-theme="engineer"] .welcomeIcon{background:rgba(20,15,0,.5);border-color:rgba(212,175,55,.15)}
[data-theme="engineer"] .smallBtn{background:rgba(20,15,0,.4);border-color:rgba(212,175,55,.18);color:rgba(255,220,100,.85)}
[data-theme="engineer"] .noteText{color:rgba(255,235,150,.9)}
[data-theme="engineer"] .themeCard.active{border-color:#d4af37}
[data-theme="engineer"] .settingsModal .modalCard{background:rgba(10,8,0,.97);border-color:rgba(212,175,55,.12)}

/* ─── Lawyer Theme ─────────────────────────────────────── */
[data-theme="lawyer"]{
  --green:#f5c518;
  --green2:#c9a000;
  --stroke:rgba(245,197,24,.14);
  --stroke2:rgba(245,197,24,.22);
  --bg0:#0c0900;
  --bg1:#070500;
}
[data-theme="lawyer"] body{background:radial-gradient(1200px 700px at 60% 20%,#1c1200 0%,#0c0900 45%,#070500 100%)}
[data-theme="lawyer"] .userBubble{background:rgba(245,197,24,.1);border-color:rgba(245,197,24,.2);color:rgba(255,240,180,.9)}
[data-theme="lawyer"] .composerInner{background:rgba(12,9,0,.5);border-color:rgba(245,197,24,.12)}
[data-theme="lawyer"] .textInput{color:rgba(255,240,180,.9)}
[data-theme="lawyer"] .textInput::placeholder{color:rgba(245,197,24,.3)}
[data-theme="lawyer"] .iconBtn{background:rgba(25,18,0,.5);border-color:rgba(245,197,24,.12)}
[data-theme="lawyer"] .iconBtn:hover{background:rgba(35,26,0,.6)}
[data-theme="lawyer"] .sendBtn{background:rgba(25,18,0,.5);border-color:rgba(245,197,24,.14)}
[data-theme="lawyer"] .primaryBtn{background:linear-gradient(180deg,rgba(245,197,24,.85),rgba(180,140,0,.85));border-color:rgba(245,197,24,.4)}
[data-theme="lawyer"] .chipBtn{background:rgba(20,15,0,.5);border-color:rgba(245,197,24,.2);color:rgba(245,197,24,.8)}
[data-theme="lawyer"] .chipBtn.active{background:linear-gradient(145deg,#f5c518,#c9a000);border-color:rgba(245,197,24,.7);color:#000}
[data-theme="lawyer"] .sidebar{background:rgba(12,9,0,.9);border-color:rgba(245,197,24,.08)}
[data-theme="lawyer"] .sessionItem{background:rgba(20,15,0,.5);border-color:rgba(245,197,24,.08)}
[data-theme="lawyer"] .sessionItem.active{border-color:rgba(245,197,24,.3)}
[data-theme="lawyer"] .sessionItem.active .sessionDot{background:#f5c518;border-color:#c9a000}
[data-theme="lawyer"] .statusDot.online{background:#f5c518;box-shadow:0 0 8px rgba(245,197,24,.7)}
[data-theme="lawyer"] .headerBtn{background:rgba(245,197,24,.1);border-color:rgba(245,197,24,.2)}
[data-theme="lawyer"] .attachMenu{background:rgba(15,12,0,.97);border-color:rgba(245,197,24,.18)}
[data-theme="lawyer"] .attachItem{color:rgba(255,230,120,.9)}
[data-theme="lawyer"] .attachItem:hover{background:rgba(245,197,24,.07)}
[data-theme="lawyer"] .genModeBadge{background:rgba(245,197,24,.1);border-color:rgba(245,197,24,.24);color:#f5c518}
[data-theme="lawyer"] .engineStatus{background:rgba(15,12,0,.3);border-color:rgba(245,197,24,.1)}
[data-theme="lawyer"] .welcomeIcon{background:rgba(25,18,0,.5);border-color:rgba(245,197,24,.15)}
[data-theme="lawyer"] .sessionItem{background:rgba(20,15,0,.5)}
[data-theme="lawyer"] .smallBtn{background:rgba(20,15,0,.4);border-color:rgba(245,197,24,.18);color:rgba(255,225,100,.85)}
[data-theme="lawyer"] .noteText{color:rgba(255,240,180,.9)}
[data-theme="lawyer"] .settingsModal .modalCard{background:rgba(12,9,0,.97);border-color:rgba(245,197,24,.12)}

/* ─── Preview cards for new themes ─────────── */
.previewEngineer{
  background:linear-gradient(135deg,#0a0800 0%,#1a1200 100%);
  border:1px solid rgba(212,175,55,.3);
  display:flex;align-items:center;justify-content:center;
}
.prevGear{font-size:28px;color:#d4af37;filter:drop-shadow(0 0 8px rgba(212,175,55,.6))}
.previewLawyer{
  background:linear-gradient(135deg,#0c0900 0%,#1c1200 100%);
  border:1px solid rgba(245,197,24,.3);
  display:flex;align-items:center;justify-content:center;
}
.prevScale{font-size:28px;color:#f5c518;filter:drop-shadow(0 0 8px rgba(245,197,24,.6))}

/* ─── More Themes Button ─────────────────────── */
.moreThemesBtn{
  width:100%;
  margin-top:8px;
  padding:8px 14px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:var(--muted2);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:6px;
  transition:background .15s,color .15s;
  letter-spacing:.3px;
}
.moreThemesBtn:hover{background:rgba(255,255,255,.07);color:var(--text)}
.moreThemesBtn svg{transition:transform .2s}
.moreThemesBtn.open svg{transform:rotate(180deg)}
.extraThemes{margin-top:10px;grid-template-columns:repeat(2,1fr)!important}

/* ─── Prontuário model pick buttons ─────────── */
.pronModelBtn{
  padding:1px 6px!important;
  border-radius:5px!important;
  border:1px solid rgba(34,211,238,.3)!important;
  background:rgba(34,211,238,.07)!important;
  color:rgba(34,211,238,.7)!important;
  font-size:10px!important;
  font-weight:700!important;
  cursor:pointer;
  line-height:1.4!important;
  transition:background .15s,color .15s;
}
.pronModelBtn:hover{background:rgba(34,211,238,.15)!important;color:#22d3ee!important}
.pronModelBtn.active{background:rgba(34,211,238,.25)!important;border-color:rgba(34,211,238,.6)!important;color:#22d3ee!important}

.streaming-cursor::after{
  content:'▍';
  display:inline-block;
  animation:blink .7s step-end infinite;
  margin-left:2px;
  color:var(--green);
  opacity:.8;
}
@keyframes blink{0%,100%{opacity:.8}50%{opacity:0}}

.aiLink{
  color:var(--green);
  text-decoration:underline;
  text-underline-offset:2px;
  word-break:break-all;
  transition:opacity .15s;
}
.aiLink:hover{opacity:.8;}
[data-theme="hack"] .aiLink{color:#00ff41;}
[data-theme="love"] .aiLink{color:#ff6b9d;}

.sessionModel{
  font-size:10px;
  padding:2px 6px;
  border-radius:5px;
  background:rgba(11,209,139,.12);
  border:1px solid rgba(11,209,139,.2);
  color:var(--green);
  white-space:nowrap;
  flex-shrink:0;
  font-weight:600;
  letter-spacing:.04em;
}
.sessionModel.v2{
  background:rgba(129,140,248,.12);
  border-color:rgba(129,140,248,.22);
  color:#818cf8;
}
.sessionModel.fast{
  background:rgba(251,191,36,.1);
  border-color:rgba(251,191,36,.22);
  color:#fbbf24;
}
.sessionModel.vmedic{
  background:rgba(34,211,238,.1);
  border-color:rgba(34,211,238,.22);
  color:#22d3ee;
}
[data-theme="hack"] .sessionModel{
  background:rgba(0,255,65,.1);
  border-color:rgba(0,255,65,.2);
  color:#00ff41;
}
[data-theme="love"] .sessionModel{
  background:rgba(255,107,157,.1);
  border-color:rgba(255,107,157,.2);
  color:#ff6b9d;
}
.sessionMeta{
  display:flex;
  gap:5px;
  align-items:center;
  margin-top:2px;
  flex-wrap:wrap;
}
.sessionInfo{
  display:flex;
  flex-direction:column;
  min-width:0;
  flex:1;
}
.sessionTitle{
  font-size:13px;
  color:rgba(255,255,255,.8);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:155px;
}

.cookieBanner{
  position:fixed;
  bottom:0;left:0;right:0;
  z-index:9999;
  padding:14px 20px;
  background:rgba(8,12,22,.97);
  border-top:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
}
.cookieBannerInner{
  max-width:900px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.cookieBannerText{
  flex:1;
  min-width:200px;
  font-size:13px;
  color:rgba(255,255,255,.78);
  line-height:1.5;
}
.cookieBannerBtns{display:flex;gap:8px;flex-shrink:0}
.cookieBtn{
  padding:8px 18px;
  border-radius:10px;
  border:none;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:opacity .15s;
}
.cookieBtn:hover{opacity:.85}
.cookieBtnAccept{background:var(--green);color:#000}
.cookieBtnReject{background:rgba(255,255,255,.1);color:rgba(255,255,255,.8);border:1px solid rgba(255,255,255,.15)}

.ghostBtnVoice{
  color:rgba(11,209,139,.9);
  border-color:rgba(11,209,139,.18);
}
.ghostBtnVoice:hover{
  border-color:rgba(11,209,139,.38);
  background:rgba(11,209,139,.07);
}

.voiceOverlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.88);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  z-index:8900;
  display:flex;
  align-items:center;
  justify-content:center;
}
.voiceOverlay.hidden{display:none}
.voiceModal{
  background:rgba(8,14,26,.96);
  border:1px solid rgba(255,255,255,.09);
  border-radius:28px;
  padding:40px 32px 36px;
  width:min(460px,92vw);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  box-shadow:0 32px 80px rgba(0,0,0,.75);
}
.voiceHeader{
  display:flex;
  align-items:center;
  gap:9px;
  color:rgba(255,255,255,.82);
  font-size:15px;
  font-weight:600;
  letter-spacing:.2px;
}

.voicePulseWrap{
  position:relative;
  width:130px;
  height:130px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.voicePulse{
  width:96px;
  height:96px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  transition:background .35s ease, border-color .35s ease;
  border:2px solid transparent;
}

.voicePulse.state-idle{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.14);
}

.voicePulse.state-listening{
  background:rgba(11,209,139,.14);
  border-color:rgba(11,209,139,.42);
  animation:vmPulse 1.8s ease-in-out infinite;
}
.voicePulse.state-listening::before,
.voicePulse.state-listening::after{
  content:'';
  position:absolute;
  width:96px;height:96px;
  border-radius:50%;
  border:2px solid rgba(11,209,139,.28);
  animation:vmRing 1.8s ease-out infinite;
}
.voicePulse.state-listening::after{animation-delay:.65s}

.voicePulse.state-thinking{
  background:rgba(129,140,248,.14);
  border-color:rgba(129,140,248,.42);
  animation:vmSpin 1.1s linear infinite;
}

.voicePulse.state-speaking{
  background:rgba(11,209,139,.18);
  border-color:rgba(11,209,139,.6);
  animation:vmSpeak .65s ease-in-out infinite alternate;
}
.voicePulse.state-speaking::before,
.voicePulse.state-speaking::after{
  content:'';
  position:absolute;
  width:96px;height:96px;
  border-radius:50%;
  border:2px solid rgba(11,209,139,.22);
  animation:vmRing .9s ease-out infinite;
}
.voicePulse.state-speaking::after{animation-delay:.35s}

@keyframes vmRing{
  0%{width:96px;height:96px;opacity:.7}
  100%{width:168px;height:168px;opacity:0}
}
@keyframes vmPulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.07)}
}
@keyframes vmSpin{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}
@keyframes vmSpeak{
  from{transform:scale(1)}
  to{transform:scale(1.1)}
}

.voiceStatus{
  font-size:13px;
  color:rgba(255,255,255,.52);
  text-align:center;
  min-height:18px;
  letter-spacing:.1px;
}
.voiceTranscript{
  font-size:15px;
  color:rgba(255,255,255,.82);
  text-align:center;
  min-height:50px;
  max-height:80px;
  overflow:hidden;
  padding:0 10px;
  line-height:1.55;
  font-style:italic;
  word-break:break-word;
}
.voiceReply{
  font-size:14px;
  color:rgba(11,209,139,.9);
  text-align:center;
  min-height:50px;
  max-height:110px;
  overflow-y:auto;
  padding:0 10px;
  line-height:1.6;
  word-break:break-word;
  scrollbar-width:none;
}
.voiceReply::-webkit-scrollbar{display:none}

.voiceEndBtn{
  margin-top:4px;
  padding:12px 28px;
  border-radius:50px;
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.12);
  color:rgba(239,68,68,.92);
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  transition:background .2s, border-color .2s;
}
.voiceEndBtn:hover{
  background:rgba(239,68,68,.24);
  border-color:rgba(239,68,68,.55);
}

.voiceMicBtn{
  width:68px;
  height:68px;
  border-radius:50%;
  background:rgba(11,209,139,.16);
  border:2.5px solid rgba(11,209,139,.5);
  color:rgba(11,209,139,1);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .2s, border-color .2s, transform .15s, box-shadow .2s;
  box-shadow:0 0 18px rgba(11,209,139,.15);
  flex-shrink:0;
}
.voiceMicBtn:hover{
  background:rgba(11,209,139,.28);
  border-color:rgba(11,209,139,.85);
  transform:scale(1.06);
  box-shadow:0 0 28px rgba(11,209,139,.3);
}
.voiceMicBtn:active{transform:scale(.96)}
.voiceMicBtn.pulsing{
  animation:vmPulse 1.4s ease-in-out infinite;
  background:rgba(11,209,139,.24);
  border-color:rgba(11,209,139,.75);
  box-shadow:0 0 24px rgba(11,209,139,.25);
}

.vmChatHistory{
  width:100%;
  max-height:180px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:7px;
  padding:0 2px;
  scrollbar-width:thin;
  scrollbar-color:rgba(11,209,139,.25) transparent;
}
.vmChatHistory::-webkit-scrollbar{width:4px}
.vmChatHistory::-webkit-scrollbar-track{background:transparent}
.vmChatHistory::-webkit-scrollbar-thumb{background:rgba(11,209,139,.25);border-radius:4px}
.vmChatUser{
  align-self:flex-end;
  background:rgba(11,209,139,.1);
  border:1px solid rgba(11,209,139,.22);
  border-radius:14px 14px 3px 14px;
  padding:8px 13px;
  font-size:13px;
  color:rgba(255,255,255,.82);
  max-width:86%;
  text-align:right;
  line-height:1.45;
}
.vmChatAssistant{
  align-self:flex-start;
  background:rgba(129,140,248,.09);
  border:1px solid rgba(129,140,248,.2);
  border-radius:14px 14px 14px 3px;
  padding:8px 13px;
  font-size:13px;
  color:rgba(255,255,255,.86);
  max-width:86%;
  line-height:1.45;
}

.voicePresetGrid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
  width:100%;
}
.voicePresetCard{
  background:rgba(255,255,255,.04);
  border:1.5px solid rgba(255,255,255,.1);
  border-radius:14px;
  padding:16px 10px 12px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
  transition:border-color .2s, background .2s, box-shadow .2s;
}
.voicePresetCard:hover{
  border-color:rgba(11,209,139,.35);
  background:rgba(11,209,139,.06);
}
.voicePresetCard.active{
  border-color:rgba(11,209,139,.65);
  background:rgba(11,209,139,.1);
  box-shadow:0 0 14px rgba(11,209,139,.12);
}
.voicePresetGender{
  font-size:22px;
  line-height:1;
  color:rgba(11,209,139,.85);
}
.voicePresetName{
  font-size:13px;
  font-weight:700;
  color:rgba(255,255,255,.88);
  letter-spacing:.1px;
}
.voicePresetDesc{
  font-size:11px;
  color:rgba(255,255,255,.42);
}

.ghostBtnHistory svg{flex-shrink:0}

.historyOverlay{
  position:fixed;inset:0;z-index:300;
  background:rgba(0,0,0,.72);
  display:flex;align-items:center;justify-content:center;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.historyOverlay.hidden{display:none}
.historyModal{
  background:rgba(14,17,30,.97);
  border:1.5px solid rgba(251,191,36,.18);
  border-radius:20px;
  width:min(520px,96vw);
  max-height:88vh;
  display:flex;
  flex-direction:column;
  padding:28px 24px 22px;
  gap:16px;
  box-shadow:0 0 60px rgba(251,191,36,.08);
}
.historyHeader{
  display:flex;align-items:center;gap:10px;
  font-size:15px;font-weight:700;
  color:rgba(255,255,255,.9);
  letter-spacing:.02em;
}
.historyHeader span{flex:1}
.historyClose{
  background:none;border:none;cursor:pointer;
  color:rgba(255,255,255,.4);font-size:16px;
  padding:2px 6px;border-radius:6px;
  transition:color .2s;
}
.historyClose:hover{color:rgba(255,255,255,.85)}
.hChatHistory{
  flex:1;overflow-y:auto;
  display:flex;flex-direction:column;
  gap:10px;padding:2px 0;
  min-height:240px;max-height:420px;
  scrollbar-width:thin;
  scrollbar-color:rgba(251,191,36,.2) transparent;
}
.hChatHistory::-webkit-scrollbar{width:4px}
.hChatHistory::-webkit-scrollbar-thumb{background:rgba(251,191,36,.2);border-radius:4px}
.hChatUser{
  align-self:flex-end;
  background:rgba(251,191,36,.1);
  border:1px solid rgba(251,191,36,.22);
  border-radius:14px 14px 3px 14px;
  padding:10px 14px;font-size:13.5px;
  color:rgba(255,255,255,.85);max-width:85%;
  text-align:right;line-height:1.5;
}
.hChatAssistant{
  align-self:flex-start;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.09);
  border-radius:14px 14px 14px 3px;
  padding:10px 14px;font-size:13.5px;
  color:rgba(255,255,255,.9);max-width:85%;
  line-height:1.55;white-space:pre-wrap;
}
.hStatus{
  font-size:12px;color:rgba(251,191,36,.6);
  text-align:center;min-height:16px;
}
.hInputRow{
  display:flex;gap:8px;
}
.hInput{
  flex:1;background:rgba(255,255,255,.05);
  border:1.5px solid rgba(255,255,255,.1);
  border-radius:12px;padding:11px 14px;
  color:rgba(255,255,255,.9);font-size:14px;
  outline:none;transition:border-color .2s;
}
.hInput:focus{border-color:rgba(251,191,36,.4)}
.hSendBtn{
  width:44px;height:44px;border-radius:12px;
  background:rgba(251,191,36,.85);border:none;
  cursor:pointer;display:flex;align-items:center;
  justify-content:center;flex-shrink:0;
  transition:background .2s;
}
.hSendBtn:hover{background:#fbbf24}
.historyEndBtn{
  background:rgba(255,255,255,.05);
  border:1.5px solid rgba(255,255,255,.1);
  border-radius:12px;padding:11px;
  color:rgba(255,255,255,.55);font-size:13px;
  cursor:pointer;transition:background .2s,color .2s;
}
.historyEndBtn:hover{background:rgba(255,255,255,.1);color:rgba(255,255,255,.85)}

.thinkBlock{
  margin-bottom:12px;
  border:1px solid rgba(167,139,250,.25);
  border-radius:12px;
  background:rgba(167,139,250,.05);
  overflow:hidden;
  font-size:13px;
}
.thinkBlock.streaming{
  border-color:rgba(167,139,250,.4);
  background:rgba(167,139,250,.08);
}
.thinkHeader{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  cursor:pointer;
  user-select:none;
  color:rgba(167,139,250,.95);
  font-weight:600;
  font-size:12px;
  letter-spacing:.04em;
  background:transparent;
  transition:background .15s;
}
.thinkHeader:hover{background:rgba(167,139,250,.1)}
.thinkSpinner{
  display:inline-block;
  width:12px;height:12px;
  border:2px solid rgba(167,139,250,.25);
  border-top-color:#a78bfa;
  border-radius:50%;
  animation:thinkSpin .65s linear infinite;
  flex-shrink:0;
}
@keyframes thinkSpin{to{transform:rotate(360deg)}}
.thinkBlock:not(.streaming) .thinkSpinner{display:none}
.thinkTimer{
  font-size:11px;
  font-weight:500;
  color:rgba(167,139,250,.6);
  font-variant-numeric:tabular-nums;
  margin-left:2px;
}
.thinkChevron{margin-left:auto;font-size:11px;transition:transform .2s;opacity:.7}
.thinkBlock.collapsed .thinkChevron{transform:rotate(-90deg)}
.thinkBody{
  padding:10px 14px;
  margin:0;
  font-family:'Courier New',monospace;
  font-size:11.5px;
  line-height:1.6;
  color:rgba(255,255,255,.4);
  white-space:pre-wrap;
  word-break:break-word;
  max-height:340px;
  overflow-y:auto;
  transition:max-height .3s ease, padding .3s ease;
  border-top:1px solid rgba(167,139,250,.1);
}
.thinkBlock.collapsed .thinkBody{
  max-height:0;
  padding-top:0;
  padding-bottom:0;
  overflow:hidden;
  border-top:none;
}
.thinkLabel{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.statusPill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 14px;
  margin-bottom:10px;
  border-radius:20px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  font-size:12.5px;
  font-weight:500;
  color:rgba(255,255,255,.72);
  letter-spacing:.02em;
  animation:statusFadeIn .2s ease;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@keyframes statusFadeIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.statusSpinner{
  display:inline-block;
  flex-shrink:0;
  width:11px;height:11px;
  border:2px solid rgba(255,255,255,.15);
  border-top-color:rgba(255,255,255,.75);
  border-radius:50%;
  animation:thinkSpin .65s linear infinite;
}
.statusTxt{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.statusIcon{
  width:14px;height:14px;
  flex-shrink:0;
  stroke:rgba(255,255,255,.7);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}
.chipBtnMedic{
  border-color:rgba(34,211,238,.3) !important;
  color:#22d3ee !important;
}
.chipBtnMedic.active{
  background:rgba(34,211,238,.15) !important;
  border-color:rgba(34,211,238,.5) !important;
}
.attachItemPron{color:#22d3ee}
.attachItemPron:hover{background:rgba(34,211,238,.08)}
.prontuarioBadge{background:rgba(34,211,238,.15);border-color:rgba(34,211,238,.4);color:#22d3ee}
.prontuarioBadge button{color:#22d3ee;opacity:.7}
.prontuarioBadge button:hover{opacity:1}
.attachSoon{
  font-size:9px;
  font-weight:700;
  letter-spacing:.05em;
  background:rgba(251,191,36,.18);
  color:#fbbf24;
  border-radius:4px;
  padding:1px 5px;
  margin-left:4px;
  text-transform:uppercase;
  vertical-align:middle;
}

@media(max-width:480px){
  .voiceModal{padding:32px 20px 28px;gap:14px}
  .voiceMicBtn{width:58px;height:58px}
  .vmChatHistory{max-height:130px}
  .voicePresetGrid{gap:8px}
  .historyModal{padding:22px 16px 18px}
  .hChatHistory{min-height:180px;max-height:280px}
}
