*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{font-size:16px;}
body{background:var(--tio-bg);color:var(--tio-text);font-family:'IBM Plex Sans',sans-serif;font-weight:400;line-height:1.5;min-height:100dvh;overflow-x:hidden;}
:root{
  --tio-bg:#080808;--tio-surface:#111111;--tio-surface-2:#181818;
  --tio-border:#232323;--tio-border-dim:#191919;
  --tio-accent:#ff6b1a;--tio-accent-dim:rgba(255,107,26,.15);--tio-accent-glow:rgba(255,107,26,.35);
  --tio-text:#f0ede8;--tio-text-dim:#666;--tio-text-mid:#999;
  --tio-success:#4ade80;--tio-radius:3px;--tio-hdr:64px;--tio-bot:72px;
}
body.light{
  --tio-bg:#f5f3ef;--tio-surface:#ece9e3;--tio-surface-2:#e2dfd8;
  --tio-border:#d0ccc5;--tio-border-dim:#dedad4;
  --tio-text:#111111;--tio-text-dim:#aaa;--tio-text-mid:#777;
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;}}
.view{display:none;min-height:100dvh;}
.view.active{display:flex;flex-direction:column;animation:view-enter .25s ease;}
@keyframes view-enter{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
/* HEADER */
.hdr{position:fixed;top:0;left:0;right:0;z-index:100;height:var(--tio-hdr);background:rgba(8,8,8,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--tio-border-dim);display:flex;align-items:center;justify-content:space-between;padding:0 20px;transition:background .3s;}
body.light .hdr{background:rgba(245,243,239,.92);}
.hdr-logo{font-family:'Orbitron',sans-serif;font-size:22px;font-weight:900;color:var(--tio-accent);letter-spacing:.05em;text-decoration:none;background:none;border:none;padding:0;display:flex;flex-direction:column;align-items:center;line-height:1;cursor:pointer;user-select:none;}
.hdr-logo span{font-family:'IBM Plex Sans',sans-serif;font-size:8px;font-weight:400;letter-spacing:.25em;color:var(--tio-text-dim);margin-top:3px;text-transform:uppercase;}
.hdr-btn{background:none;border:1px solid var(--tio-border);color:var(--tio-text-mid);width:44px;height:44px;min-width:44px;min-height:44px;border-radius:var(--tio-radius);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color .2s,border-color .2s,background .2s;flex-shrink:0;}
.hdr-btn:hover{color:var(--tio-accent);border-color:var(--tio-accent);background:var(--tio-accent-dim);}
.hdr-btn:focus-visible{outline:2px solid var(--tio-accent);outline-offset:2px;}
.hdr-right{display:flex;gap:8px;}
/* MAIN */
.main-scroll{flex:1;padding-top:var(--tio-hdr);padding-bottom:calc(var(--tio-bot) + 24px);display:flex;flex-direction:column;align-items:center;overflow-y:auto;}
/* ORB */
.orb-wrap{position:relative;width:220px;height:220px;margin:40px auto 8px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;}
.orb-wrap::before{content:'';position:absolute;width:100%;height:100%;border-radius:50%;border:1px solid var(--tio-accent);opacity:0;animation:sonar 3s ease-out infinite;pointer-events:none;}
@keyframes sonar{0%{transform:scale(.6);opacity:0;}20%{opacity:.6;}100%{transform:scale(1.4);opacity:0;}}
.orb-wrap:focus-visible{outline:2px solid var(--tio-accent);outline-offset:8px;border-radius:50%;}
.orb-ring{position:absolute;border-radius:50%;border:1px solid var(--tio-accent);opacity:0;animation:ring-fade 4s ease-in-out infinite;}
.orb-ring:nth-child(1){width:200px;height:200px;--o:.08;animation-delay:0s;}
.orb-ring:nth-child(2){width:160px;height:160px;--o:.12;animation-delay:.4s;}
.orb-ring:nth-child(3){width:120px;height:120px;--o:.18;animation-delay:.8s;}
.orb-ring:nth-child(4){width:80px;height:80px;--o:.25;animation-delay:1.2s;}
@keyframes ring-fade{0%,100%{opacity:var(--o,.1);transform:scale(1);}50%{opacity:calc(var(--o,.1)*2.5);transform:scale(1.04);}}
.orb-core{width:56px;height:56px;border-radius:50%;background:radial-gradient(circle at 38% 35%,#ffae70,var(--tio-accent) 50%,#a83300);box-shadow:0 0 16px 4px var(--tio-accent-glow),0 0 40px 8px rgba(255,107,26,.18),0 0 80px 16px rgba(255,107,26,.06);transition:transform .2s,box-shadow .2s;z-index:2;animation:core-breathe 4s ease-in-out infinite;}
@keyframes core-breathe{0%,100%{box-shadow:0 0 16px 4px var(--tio-accent-glow),0 0 40px 8px rgba(255,107,26,.18);}50%{box-shadow:0 0 22px 6px var(--tio-accent-glow),0 0 56px 12px rgba(255,107,26,.25);}}
.orb-wrap:hover .orb-core{transform:scale(1.08);box-shadow:0 0 20px 6px var(--tio-accent-glow),0 0 56px 12px rgba(255,107,26,.25),0 0 100px 24px rgba(255,107,26,.1);}
.orb-wrap.recording .orb-core{animation:orb-pulse .8s ease-in-out infinite alternate!important;}
.orb-wrap.recording::before{animation:none;opacity:0;}
@keyframes orb-pulse{from{transform:scale(1);box-shadow:0 0 16px 4px var(--tio-accent-glow),0 0 40px 8px rgba(255,107,26,.18);}to{transform:scale(1.15);box-shadow:0 0 30px 10px rgba(255,107,26,.55),0 0 70px 20px rgba(255,107,26,.3);}}
.orb-wrap.recording .orb-ring{animation:ring-pulse .8s ease-in-out infinite alternate;}
@keyframes ring-pulse{from{opacity:var(--o,.1);}to{opacity:calc(var(--o,.1)*4);}}
.orb-spinner{position:absolute;width:80px;height:80px;border-radius:50%;border:1px solid transparent;border-top-color:var(--tio-accent);opacity:0;z-index:3;transition:opacity .3s;}
.orb-wrap.processing .orb-spinner{opacity:1;animation:spin 1s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
/* STATUS */
.status-label{text-align:center;margin-bottom:8px;}
.status-label .mode{font-family:'Orbitron',sans-serif;font-size:9px;font-weight:400;letter-spacing:.35em;color:var(--tio-text-dim);text-transform:uppercase;display:block;}
.status-label .state{font-family:'IBM Plex Mono',monospace;font-size:12px;font-weight:500;color:var(--tio-accent);letter-spacing:.15em;text-transform:uppercase;display:block;margin-top:4px;}
.status-label .hint{font-size:12px;color:var(--tio-text-dim);margin-top:4px;display:block;font-weight:300;letter-spacing:.02em;}
/* WAVEFORM */
.waveform{display:flex;align-items:center;justify-content:center;gap:2px;height:24px;margin:10px auto;opacity:0;transition:opacity .3s;}
.waveform.active{opacity:1;}
.waveform-bar{width:2px;background:var(--tio-accent);border-radius:1px;animation:wave 1s ease-in-out infinite;opacity:.5;}
.waveform-bar:nth-child(1){height:4px;animation-delay:.00s;}.waveform-bar:nth-child(2){height:8px;animation-delay:.06s;}
.waveform-bar:nth-child(3){height:14px;animation-delay:.12s;}.waveform-bar:nth-child(4){height:10px;animation-delay:.18s;}
.waveform-bar:nth-child(5){height:18px;animation-delay:.24s;}.waveform-bar:nth-child(6){height:22px;animation-delay:.30s;}
.waveform-bar:nth-child(7){height:16px;animation-delay:.36s;}.waveform-bar:nth-child(8){height:20px;animation-delay:.42s;}
.waveform-bar:nth-child(9){height:12px;animation-delay:.48s;}.waveform-bar:nth-child(10){height:18px;animation-delay:.54s;}
.waveform-bar:nth-child(11){height:8px;animation-delay:.60s;}.waveform-bar:nth-child(12){height:14px;animation-delay:.66s;}
.waveform-bar:nth-child(13){height:6px;animation-delay:.72s;}.waveform-bar:nth-child(14){height:10px;animation-delay:.78s;}
.waveform-bar:nth-child(15){height:4px;animation-delay:.84s;}
@keyframes wave{0%,100%{transform:scaleY(1);opacity:.5;}50%{transform:scaleY(1.6);opacity:1;}}
/* CARDS */
.cards-grid{width:100%;max-width:480px;padding:0 20px;display:flex;flex-direction:column;gap:10px;animation:stagger-in .5s ease both;}
@keyframes stagger-in{from{opacity:0;transform:translateY(16px);}to{opacity:1;transform:none;}}
.card{background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:16px 18px;display:flex;align-items:center;gap:16px;cursor:pointer;text-decoration:none;color:inherit;transition:border-color .2s,background .2s,transform .15s;animation:card-in .4s ease both;position:relative;overflow:hidden;}
.card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tio-accent);opacity:0;transition:opacity .2s;}
.card:nth-child(1){animation-delay:.05s;}.card:nth-child(2){animation-delay:.12s;}.card:nth-child(3){animation-delay:.19s;}
@keyframes card-in{from{opacity:0;transform:translateX(-12px);}to{opacity:1;transform:none;}}
.card:hover{border-color:rgba(255,107,26,.4);background:var(--tio-surface-2);transform:translateX(2px);}
.card:hover::before{opacity:1;}
.card:focus-visible{outline:2px solid var(--tio-accent);outline-offset:2px;}
.card:active{transform:scale(.99);}
.card-icon{width:42px;height:42px;flex-shrink:0;border:1px solid var(--tio-border);border-radius:var(--tio-radius);display:flex;align-items:center;justify-content:center;background:var(--tio-bg);transition:border-color .2s;}
.card:hover .card-icon{border-color:rgba(255,107,26,.4);}
.card-icon svg{width:20px;height:20px;stroke:var(--tio-accent);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.card-text{flex:1;min-width:0;}
.card-title{font-family:'Orbitron',sans-serif;font-size:11px;font-weight:700;letter-spacing:.12em;color:var(--tio-text);text-transform:uppercase;display:block;}
.card-desc{font-size:12px;color:var(--tio-text-dim);margin-top:3px;display:block;font-weight:300;}
.card-arrow{flex-shrink:0;color:var(--tio-text-dim);transition:color .2s,transform .2s;}
.card:hover .card-arrow{color:var(--tio-accent);transform:translateX(3px);}
.card-arrow svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
/* BOTTOM BAR */
.bottom-bar{position:fixed;bottom:0;left:0;right:0;z-index:100;height:var(--tio-bot);background:rgba(8,8,8,.95);backdrop-filter:blur(16px);border-top:1px solid var(--tio-border-dim);display:flex;align-items:center;padding:0 20px;padding-bottom:env(safe-area-inset-bottom);}
body.light .bottom-bar{background:rgba(245,243,239,.95);}
.bottom-mic{width:48px;height:48px;border-radius:50%;background:var(--tio-accent-dim);border:1px solid rgba(255,107,26,.5);color:var(--tio-accent);cursor:pointer;display:flex;align-items:center;justify-content:center;margin:0 auto;transition:background .2s,box-shadow .2s,transform .15s;flex-shrink:0;}
.bottom-mic:hover{background:rgba(255,107,26,.25);box-shadow:0 0 16px rgba(255,107,26,.3);}
.bottom-mic.recording{background:var(--tio-accent);box-shadow:0 0 20px rgba(255,107,26,.5);animation:mic-pulse .7s ease infinite alternate;}
@keyframes mic-pulse{from{box-shadow:0 0 10px rgba(255,107,26,.4);}to{box-shadow:0 0 28px rgba(255,107,26,.7);}}
.bottom-mic:focus-visible{outline:2px solid var(--tio-accent);outline-offset:3px;}
.bottom-mic svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
.bottom-mic.recording svg{stroke:#fff;}
.bottom-btn{flex:1;height:100%;min-height:44px;background:none;border:none;color:var(--tio-text-dim);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-family:'IBM Plex Sans',sans-serif;font-size:10px;font-weight:500;letter-spacing:.1em;text-transform:uppercase;transition:color .2s;}
.bottom-btn:hover,.bottom-btn.active{color:var(--tio-accent);}
.bottom-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;}
.bottom-btn:focus-visible{outline:2px solid var(--tio-accent);}
/* CHAT */
#view-chat .main-scroll{padding-bottom:80px;}
.chat-messages{width:100%;max-width:720px;margin:0 auto;padding:24px 20px;display:flex;flex-direction:column;gap:20px;}
.chat-msg{display:flex;gap:12px;animation:msg-in .25s ease both;}
@keyframes msg-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;}}
.chat-msg.user{flex-direction:row-reverse;}
.chat-avatar{width:32px;height:32px;border-radius:50%;border:1px solid var(--tio-border);background:var(--tio-surface);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-family:'Orbitron',sans-serif;font-size:8px;font-weight:700;color:var(--tio-accent);}
.chat-bubble{max-width:75%;background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:12px 16px;font-size:14px;line-height:1.65;}
.chat-msg.user .chat-bubble{background:var(--tio-accent-dim);border-color:rgba(255,107,26,.25);}
.chat-bubble.status-msg{color:var(--tio-text-dim);font-style:italic;font-size:13px;}
.chat-input-bar{position:fixed;bottom:0;left:0;right:0;z-index:100;background:rgba(8,8,8,.95);backdrop-filter:blur(16px);border-top:1px solid var(--tio-border-dim);padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom));display:flex;gap:10px;align-items:flex-end;}
body.light .chat-input-bar{background:rgba(245,243,239,.95);}
.chat-textarea{flex:1;background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:10px 14px;color:var(--tio-text);font-family:'IBM Plex Sans',sans-serif;font-size:14px;resize:none;min-height:42px;max-height:120px;line-height:1.5;transition:border-color .2s;}
.chat-textarea:focus{outline:none;border-color:rgba(255,107,26,.5);}
.chat-textarea::placeholder{color:var(--tio-text-dim);}
.chat-send{width:42px;height:42px;flex-shrink:0;background:var(--tio-accent);border:none;border-radius:var(--tio-radius);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity .2s,transform .15s;}
.chat-send:hover{opacity:.85;}.chat-send:active{transform:scale(.96);}
.chat-send svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;}
.chat-mic-btn{width:42px;height:42px;flex-shrink:0;background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--tio-text-mid);transition:color .2s,border-color .2s;}
.chat-mic-btn:hover{color:var(--tio-accent);border-color:rgba(255,107,26,.4);}
/* SECTION CONTENT */
.section-body{flex:1;padding-top:calc(var(--tio-hdr) + 20px);padding-bottom:32px;padding-left:20px;padding-right:20px;max-width:800px;margin:0 auto;width:100%;display:flex;flex-direction:column;gap:16px;}
/* NOTAS */
.note-item{background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:16px 18px;transition:border-color .2s,background .2s;animation:card-in .35s ease both;}
.note-item:hover{border-color:rgba(255,107,26,.35);background:var(--tio-surface-2);}
.note-item-date{font-size:11px;color:var(--tio-text-dim);margin-bottom:6px;font-family:'IBM Plex Mono',monospace;}
.note-item-preview{font-size:14px;color:var(--tio-text);line-height:1.6;}
/* BRIEFING */
.briefing-block{background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:20px 22px;border-left:2px solid var(--tio-accent);}
.briefing-block h3{font-family:'Orbitron',sans-serif;font-size:10px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--tio-accent);margin-bottom:10px;}
.briefing-block p{font-size:14px;color:var(--tio-text);line-height:1.7;font-weight:300;}
.briefing-meta{display:flex;gap:16px;flex-wrap:wrap;}
.meta-item{display:flex;flex-direction:column;gap:3px;}
.meta-label{font-size:9px;letter-spacing:.2em;text-transform:uppercase;color:var(--tio-text-dim);font-family:'IBM Plex Mono',monospace;}
.meta-value{font-size:13px;color:var(--tio-text);font-weight:500;}
.artigo-link{display:flex;align-items:baseline;gap:10px;padding:11px 0;border-bottom:1px solid var(--tio-border);text-decoration:none;color:inherit;transition:color .15s;}
.artigo-link:last-child{border-bottom:none;padding-bottom:0;}
.artigo-link:first-child{padding-top:0;}
.artigo-link:hover .artigo-titulo{color:var(--tio-accent);}
.artigo-fonte{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--tio-accent);flex-shrink:0;}
.artigo-titulo{font-size:14px;line-height:1.4;flex:1;}
.artigo-seta{font-size:14px;color:var(--tio-text-dim);flex-shrink:0;}
/* SANDBOX */
.sandbox-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;}
.file-card{background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:16px 14px;cursor:pointer;transition:border-color .2s,background .2s;display:flex;flex-direction:column;gap:10px;animation:card-in .3s ease both;}
.file-card:hover{border-color:rgba(255,107,26,.4);background:var(--tio-surface-2);}
.file-icon svg{width:32px;height:32px;stroke:var(--tio-accent);fill:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;opacity:.7;}
.file-name{font-size:12px;color:var(--tio-text);word-break:break-all;}
.file-size{font-size:10px;color:var(--tio-text-dim);font-family:'IBM Plex Mono',monospace;}
/* DRAWER */
.drawer-overlay{position:fixed;inset:0;z-index:200;background:rgba(0,0,0,.7);backdrop-filter:blur(4px);opacity:0;pointer-events:none;transition:opacity .3s;}
.drawer-overlay.open{opacity:1;pointer-events:all;}
.drawer{position:fixed;top:0;left:0;bottom:0;z-index:201;width:min(300px,85vw);background:var(--tio-surface);border-right:1px solid var(--tio-border);transform:translateX(-100%);transition:transform .3s cubic-bezier(.25,.46,.45,.94);display:flex;flex-direction:column;overflow-y:auto;}
.drawer.open{transform:none;}
.drawer-hdr{padding:20px 20px 16px;border-bottom:1px solid var(--tio-border-dim);display:flex;align-items:center;justify-content:space-between;}
.drawer-logo{font-family:'Orbitron',sans-serif;font-size:16px;font-weight:900;color:var(--tio-accent);}
.drawer-close{background:none;border:none;cursor:pointer;color:var(--tio-text-dim);padding:4px;}
.drawer-close:hover{color:var(--tio-text);}
.drawer-close svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
.drawer-nav{flex:1;padding:12px 0;}
.drawer-item{display:flex;align-items:center;gap:12px;padding:12px 20px;cursor:pointer;border:none;background:none;width:100%;text-align:left;color:var(--tio-text-mid);font-family:'IBM Plex Sans',sans-serif;font-size:13px;transition:color .2s,background .2s;}
.drawer-item:hover,.drawer-item.active{color:var(--tio-text);background:var(--tio-surface-2);}
.drawer-item.active{color:var(--tio-accent);}
.drawer-item svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
.drawer-section-label{padding:16px 20px 6px;font-size:9px;letter-spacing:.3em;text-transform:uppercase;color:var(--tio-text-dim);font-family:'IBM Plex Mono',monospace;}
.drawer-divider{border:none;border-top:1px solid var(--tio-border-dim);margin:8px 0;}
.drawer-footer{padding:16px 20px;border-top:1px solid var(--tio-border-dim);}
.drawer-user{display:flex;align-items:center;gap:10px;}
.drawer-avatar{width:36px;height:36px;border-radius:50%;background:var(--tio-accent-dim);border:1px solid rgba(255,107,26,.3);display:flex;align-items:center;justify-content:center;font-family:'Orbitron',sans-serif;font-size:9px;font-weight:700;color:var(--tio-accent);}
.drawer-username{font-size:13px;font-weight:500;color:var(--tio-text);}
.drawer-role{font-size:10px;color:var(--tio-text-dim);font-family:'IBM Plex Mono',monospace;letter-spacing:.08em;}
/* VOICE RESPONSE TOAST */
.tio-response{position:fixed;bottom:calc(var(--tio-bot) + 16px);left:16px;right:16px;z-index:150;background:var(--tio-surface);border:1px solid rgba(255,107,26,.3);border-radius:var(--tio-radius);padding:14px 16px;animation:toast-in .3s ease both;box-shadow:0 8px 32px rgba(0,0,0,.5);display:none;}
.tio-response.show{display:block;}
@keyframes toast-in{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:none;}}
.tio-response-label{font-family:'Orbitron',sans-serif;font-size:8px;font-weight:700;letter-spacing:.25em;color:var(--tio-accent);text-transform:uppercase;margin-bottom:6px;}
.tio-response-text{font-size:14px;color:var(--tio-text);line-height:1.6;font-weight:300;}
.tio-response-close{position:absolute;top:10px;right:10px;background:none;border:none;cursor:pointer;color:var(--tio-text-dim);}
.tio-response-close:hover{color:var(--tio-text);}
/* DESKTOP */
@media(min-width:1024px){
  :root{--tio-bot:0px;}
  .bottom-bar{display:none;}
  .desktop-left{display:flex;flex-direction:column;align-items:flex-start;gap:0;width:200px;flex-shrink:0;padding-top:8px;position:fixed;top:calc(var(--tio-hdr) + 40px);left:max(24px,calc(50% - 520px));}
  .desktop-center{display:flex;flex-direction:column;align-items:center;width:100%;max-width:520px;}
  .desktop-mic-row{width:100%;display:flex;align-items:center;gap:12px;margin-top:8px;}
  .desktop-input{flex:1;background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:11px 16px;color:var(--tio-text);font-family:'IBM Plex Sans',sans-serif;font-size:14px;transition:border-color .2s;}
  .desktop-input:focus{outline:none;border-color:rgba(255,107,26,.5);}
  .desktop-input::placeholder{color:var(--tio-text-dim);}
  .desktop-mic-btn{width:44px;height:44px;border-radius:var(--tio-radius);background:var(--tio-accent-dim);border:1px solid rgba(255,107,26,.4);color:var(--tio-accent);cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:background .2s,box-shadow .2s;}
  .desktop-mic-btn:hover{background:rgba(255,107,26,.25);box-shadow:0 0 12px rgba(255,107,26,.2);}
  .desktop-mic-btn.recording{background:var(--tio-accent);animation:mic-pulse .7s infinite alternate;}
  .desktop-mic-btn.recording svg{stroke:#fff;}
  .desktop-mic-btn svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
  .desktop-chat-btn{margin-top:16px;width:100%;background:none;border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:10px 16px;color:var(--tio-text-dim);cursor:pointer;font-family:'Orbitron',sans-serif;font-size:9px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;display:flex;align-items:center;justify-content:center;gap:8px;transition:color .2s,border-color .2s,background .2s;}
  .desktop-chat-btn:hover{color:var(--tio-accent);border-color:rgba(255,107,26,.4);background:var(--tio-accent-dim);}
  .desktop-chat-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
  .cards-grid{max-width:100%;padding:0;}
  .card{padding:14px 16px;}
  .desktop-nav-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--tio-radius);cursor:pointer;border:none;background:none;width:100%;text-align:left;color:var(--tio-text-dim);font-family:'IBM Plex Sans',sans-serif;font-size:12px;letter-spacing:.06em;text-transform:uppercase;font-weight:500;transition:color .2s,background .2s;}
  .desktop-nav-item:hover{color:var(--tio-text);background:var(--tio-surface);}
  .desktop-nav-item.active{color:var(--tio-accent);background:var(--tio-accent-dim);}
  .desktop-nav-item svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
  .desktop-version{margin-top:auto;padding-top:24px;font-size:9px;color:var(--tio-text-dim);font-family:'IBM Plex Mono',monospace;letter-spacing:.1em;}
  .hdr-hamburger{display:none;}
  #view-chat .main-scroll{align-items:center;padding-bottom:100px;}
  .view#view-home .main-scroll{flex-direction:column;align-items:center;justify-content:flex-start;padding-top:calc(var(--tio-hdr) + 40px);padding-bottom:48px;}
}
@media(min-width:640px) and (max-width:1023px){
  .cards-grid{max-width:600px;}
  .orb-wrap{width:180px;height:180px;}
  .orb-ring:nth-child(1){width:165px;height:165px;}
  .orb-ring:nth-child(2){width:130px;height:130px;}
  .orb-ring:nth-child(3){width:100px;height:100px;}
  .orb-ring:nth-child(4){width:70px;height:70px;}
}
/* USER PICKER */
.user-picker{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-bottom:8px;}
.user-btn{background:none;border:none;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px;border-radius:var(--tio-radius);transition:transform .15s;}
.user-btn:hover{transform:translateY(-2px);}
.user-btn:focus-visible{outline:2px solid var(--tio-accent);outline-offset:2px;}
.user-avatar{width:64px;height:64px;border-radius:50%;border:2px solid var(--tio-border);background:var(--tio-surface);display:flex;align-items:center;justify-content:center;font-family:'Orbitron',sans-serif;font-size:18px;font-weight:700;color:var(--tio-text-mid);transition:border-color .2s,color .2s,box-shadow .2s;}
.user-btn:hover .user-avatar{border-color:rgba(255,107,26,.5);color:var(--tio-accent);}
.user-btn.selected .user-avatar{border-color:var(--tio-accent);color:var(--tio-accent);box-shadow:0 0 16px var(--tio-accent-dim);}
.user-name{font-size:12px;color:var(--tio-text-dim);font-family:'IBM Plex Sans',sans-serif;letter-spacing:.04em;transition:color .2s;}
.user-btn:hover .user-name,.user-btn.selected .user-name{color:var(--tio-text);}
.user-picker-empty{font-size:12px;color:var(--tio-text-dim);text-align:center;padding:12px;}
/* LOGIN */
.login-wrap{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;padding-top:calc(24px + env(safe-area-inset-top));min-height:100dvh;}
.login-orb-logo{font-family:'Orbitron',sans-serif;font-size:48px;font-weight:900;color:var(--tio-accent);letter-spacing:.05em;text-shadow:0 0 32px var(--tio-accent-glow);}
.login-sub{font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:var(--tio-text-dim);margin-top:6px;margin-bottom:32px;}
.login-card{width:100%;max-width:360px;background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:28px 24px;display:flex;flex-direction:column;gap:14px;}
.form-input{background:var(--tio-bg);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:11px 14px;color:var(--tio-text);font-family:'IBM Plex Sans',sans-serif;font-size:14px;width:100%;transition:border-color .2s;}
.form-input:focus{outline:none;border-color:rgba(255,107,26,.5);}
.form-input::placeholder{color:var(--tio-text-dim);}
.check-row{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--tio-text-dim);cursor:pointer;}
.check-row input[type=checkbox]{accent-color:var(--tio-accent);width:14px;height:14px;}
.btn-primary{background:var(--tio-accent);color:#fff;border:none;border-radius:var(--tio-radius);padding:12px;font-family:'Orbitron',sans-serif;font-size:11px;font-weight:700;letter-spacing:.15em;cursor:pointer;width:100%;transition:opacity .2s;}
.btn-primary:hover{opacity:.85;}
.btn-primary:disabled{opacity:.5;cursor:not-allowed;}
.btn-secondary{background:none;color:var(--tio-text-dim);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:11px;font-family:'IBM Plex Sans',sans-serif;font-size:13px;cursor:pointer;width:100%;transition:color .2s,border-color .2s;}
.btn-secondary:hover{color:var(--tio-accent);border-color:rgba(255,107,26,.4);}
.login-error{font-size:13px;color:#f87171;background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.3);border-radius:var(--tio-radius);padding:10px 12px;display:none;}
/* MODALS */
.modal-overlay{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.75);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:24px;}
.modal-overlay.open{display:flex;}
.modal{background:var(--tio-surface);border:1px solid var(--tio-border);border-radius:var(--tio-radius);width:100%;max-width:440px;display:flex;flex-direction:column;max-height:80dvh;overflow:hidden;}
.modal-hdr{padding:20px 20px 16px;border-bottom:1px solid var(--tio-border-dim);display:flex;align-items:center;justify-content:space-between;flex-shrink:0;}
.modal-title{font-family:'Orbitron',sans-serif;font-size:11px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--tio-accent);}
.modal-close{background:none;border:none;cursor:pointer;color:var(--tio-text-dim);padding:4px;display:flex;}
.modal-close:hover{color:var(--tio-text);}
.modal-close svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
.modal-body{padding:20px;display:flex;flex-direction:column;gap:14px;overflow-y:auto;flex:1;}
.modal-footer{padding:16px 20px;border-top:1px solid var(--tio-border-dim);display:flex;gap:10px;justify-content:flex-end;flex-shrink:0;}
.modal-error{font-size:13px;color:#f87171;background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.3);border-radius:var(--tio-radius);padding:8px 12px;display:none;}
.form-label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--tio-text-dim);margin-bottom:6px;display:block;font-family:'IBM Plex Mono',monospace;}
.check-label{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--tio-text-mid);cursor:pointer;padding:6px 0;}
.check-label input[type=checkbox]{accent-color:var(--tio-accent);}
.passkey-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--tio-border-dim);}
.passkey-item:last-child{border-bottom:none;}
.passkey-name{font-size:13px;font-weight:500;color:var(--tio-text);}
.passkey-date{font-size:11px;color:var(--tio-text-dim);font-family:'IBM Plex Mono',monospace;margin-top:3px;}
.btn-danger-sm{background:none;border:1px solid rgba(248,113,113,.4);color:#f87171;border-radius:var(--tio-radius);padding:6px 10px;font-size:12px;cursor:pointer;flex-shrink:0;transition:background .2s;}
.btn-danger-sm:hover{background:rgba(248,113,113,.15);}
.btn-sm{background:none;border:1px solid var(--tio-border);color:var(--tio-text-dim);border-radius:var(--tio-radius);padding:8px 16px;font-size:13px;cursor:pointer;transition:color .2s,border-color .2s;}
.btn-sm:hover{color:var(--tio-accent);border-color:rgba(255,107,26,.4);}
.btn-sm-primary{background:var(--tio-accent);color:#fff;border:none;border-radius:var(--tio-radius);padding:8px 16px;font-size:13px;cursor:pointer;transition:opacity .2s;}
.btn-sm-primary:hover{opacity:.85;}
/* FILE MODAL */
.file-content-pre{background:var(--tio-bg);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:14px;font-family:'IBM Plex Mono',monospace;font-size:12px;line-height:1.6;overflow:auto;max-height:320px;color:var(--tio-text);white-space:pre-wrap;word-break:break-all;}
/* GLOBAL TOAST */
.global-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(16px);z-index:400;background:var(--tio-surface-2);border:1px solid var(--tio-border);border-radius:var(--tio-radius);padding:12px 20px;font-size:13px;color:var(--tio-text);opacity:0;pointer-events:none;transition:opacity .3s,transform .3s;white-space:nowrap;}
.global-toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
/* UTILS */
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
.desktop-only{display:none;}
@media(min-width:1024px){.desktop-only{display:flex;}}
.mobile-only{display:flex;}
@media(min-width:1024px){.mobile-only{display:none!important;}}
.loading-msg{font-size:13px;color:var(--tio-text-dim);padding:24px;text-align:center;font-weight:300;line-height:1.7;}
.empty-msg{font-size:14px;color:var(--tio-text-mid);padding:32px 16px;text-align:center;font-weight:300;line-height:1.7;}
.empty-msg strong{color:var(--tio-text);font-weight:500;display:block;margin-bottom:8px;}
.empty-msg em{color:var(--tio-accent);font-style:normal;font-family:'IBM Plex Mono',monospace;font-size:12px;background:var(--tio-accent-dim);padding:2px 6px;border-radius:2px;}
@media(max-width:480px){.modal-overlay{padding:12px;}.modal-body{padding:16px;}}
/* AUTH GATING: hide nav elements until logged in */
.hdr-hamburger,.hdr-right,.bottom-bar,.desktop-left{visibility:hidden;pointer-events:none;}
body.auth .hdr-hamburger,body.auth .hdr-right,body.auth .bottom-bar,body.auth .desktop-left{visibility:visible;pointer-events:auto;}
/* ACCOUNT DROPDOWN */
.acct-dropdown{position:fixed;top:calc(var(--tio-hdr) + 4px);right:12px;z-index:200;background:var(--tio-surface-2);border:1px solid var(--tio-border);border-radius:var(--tio-radius);min-width:200px;box-shadow:0 8px 24px rgba(0,0,0,.4);display:none;flex-direction:column;padding:6px 0;}
.acct-dropdown.open{display:flex;}
.acct-dropdown-item{background:none;border:none;color:var(--tio-text-mid);font-size:13px;padding:10px 16px;text-align:left;cursor:pointer;display:flex;align-items:center;gap:10px;width:100%;transition:color .15s,background .15s;}
.acct-dropdown-item:hover{color:var(--tio-text);background:var(--tio-surface);}
.acct-dropdown-item svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;flex-shrink:0;}
.acct-dropdown-divider{height:1px;background:var(--tio-border);margin:4px 0;}
/* SECTION BACK BUTTON */
.section-back{background:none;border:none;color:var(--tio-text-dim);font-size:12px;letter-spacing:.08em;padding:0 0 12px;cursor:pointer;display:flex;align-items:center;gap:6px;text-transform:uppercase;}
.section-back:hover{color:var(--tio-accent);}
.section-back svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
/* CONSUMO TABS */
.consumo-tab{background:var(--tio-surface);border:1px solid var(--tio-border);color:var(--tio-text-dim);font-size:12px;letter-spacing:.08em;text-transform:uppercase;padding:6px 16px;border-radius:var(--tio-radius);cursor:pointer;transition:color .15s,border-color .15s;}
.consumo-tab:hover{color:var(--tio-text);}
.consumo-tab-active{border-color:var(--tio-accent);color:var(--tio-accent);}
/* PROACTIVE BANNER */
.proat-banner{background:var(--tio-surface);border:1px solid var(--tio-border);border-left:3px solid var(--tio-accent);border-radius:var(--tio-radius);padding:10px 12px;font-size:13px;margin-bottom:4px;}
.proat-banner-budget{border-left-color:#e05252;}
.proat-banner-dismiss{float:right;background:none;border:none;color:var(--tio-text-dim);cursor:pointer;font-size:16px;line-height:1;padding:0 0 0 8px;}
