/* GENERADO por tools/gen_dark.py: no editar a mano. Ajustes finos al final de este archivo (sección manual). */
html[data-theme=dark] button:hover{border-color:#404452}
html[data-theme=dark] button:focus-visible,html[data-theme=dark] input:focus-visible,html[data-theme=dark] select:focus-visible,html[data-theme=dark] textarea:focus-visible,html[data-theme=dark] a:focus-visible{outline:3px solid #241a7b}
html[data-theme=dark] button.danger{border-color:#572428}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{border:1px solid #6a6e7c;background:#171717}
html[data-theme=dark] .bot-h:hover{background:#171a27}
html[data-theme=dark] .av{color:#4435AD}
html[data-theme=dark] .av.person{background:#1f222d;color:#a3a7b6}
html[data-theme=dark] .av .dot{border:2px solid #171717;background:#585e6b}
html[data-theme=dark] .av .dot.on{background:#2E9D5B}
html[data-theme=dark] .badge{background:#1b1f2a;color:#a3a7b6}
html[data-theme=dark] .badge.dueno{color:#3A2EA0}
html[data-theme=dark] .badge.lector{background:#1b1f2a;color:#a3a7b6}
html[data-theme=dark] .badge.ai{color:#4435AD}
html[data-theme=dark] .chat-item:hover{background:#171a27}
html[data-theme=dark] .chat-item.active{background:#0c053b}
html[data-theme=dark] .bubble{background:#171717}
html[data-theme=dark] .msg.me .bubble{color:#171717}
html[data-theme=dark] .msg.me .meta,html[data-theme=dark] .msg.me .meta .badge{color:#0c053e}
html[data-theme=dark] .msg.me .msg-actions button{color:#171717}
html[data-theme=dark] .sys{background:#1b1f2a}
html[data-theme=dark] .card{background:#171717}
html[data-theme=dark] .chip{background:#1b1f2a;color:#a3a7b6}
html[data-theme=dark] .hl{background:#83680b;color:#bdc0d1}
html[data-theme=dark] .flash .bubble{box-shadow:0 0 0 3px #b48d0f}
html[data-theme=dark] .mic.rec{color:#171717}
html[data-theme=dark] .tabs button.on{color:#171717}
html[data-theme=dark] .item{background:#171717}
html[data-theme=dark] .result{background:#171717}
html[data-theme=dark] .code{background:#171a27}
html[data-theme=dark] pre.cmd{background:#bec0d2;color:#20202d}
html[data-theme=dark] table{background:#171717}
html[data-theme=dark] .dialog{background:#171717}
html[data-theme=dark] #toast{background:#bdc0d1;color:#171717}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#888a98}
html[data-theme=dark] button{border-color:#6a6e7c}
html[data-theme=dark] button:hover{background:#1c1e27}
html[data-theme=dark] button.primary:hover{background:#382CAE}
html[data-theme=dark] button:focus-visible,html[data-theme=dark] input:focus-visible,html[data-theme=dark] select:focus-visible,html[data-theme=dark] textarea:focus-visible,html[data-theme=dark] a:focus-visible,html[data-theme=dark] summary:focus-visible{outline:3px solid #4B3FD1}
html[data-theme=dark] .skip-link{background:#171717}
html[data-theme=dark] .rail{background:#1c1e27}
html[data-theme=dark] .rail button{color:#9398a7}
html[data-theme=dark] .rail button[aria-current=page]{background:#171717}
html[data-theme=dark] .search-entry input{background:#171a22}
html[data-theme=dark] .bot summary:hover{background:#151825}
html[data-theme=dark] .av .dot.on{background:#91d3b4}
html[data-theme=dark] .badge{background:#1b1f2a;color:#9196a5}
html[data-theme=dark] .badge.dueno,html[data-theme=dark] .badge.ai{color:#4435AD}
html[data-theme=dark] .badge.escritor,html[data-theme=dark] .badge.consultor,html[data-theme=dark] .badge.lector{color:#9196a5;background:#1b1f2a}
html[data-theme=dark] .main{background:#151a20}
html[data-theme=dark] .msg.me .bubble{border-color:#1d1441}
html[data-theme=dark] .msg.me .meta .badge{background:#1d1639;color:#9196a5}
html[data-theme=dark] .card{border:1px solid #302859}
html[data-theme=dark] .card details .body{background:#171a22}
html[data-theme=dark] .chip{background:#1b1f2a;color:#9196a5}
html[data-theme=dark] .chip.queued{background:#1b1f2a;color:#9196a5}
html[data-theme=dark] .hl{background:#775b0a}
html[data-theme=dark] .composer textarea{background:#151a20}
html[data-theme=dark] .mic{background:#171a24}
html[data-theme=dark] .tabs button.on{border-color:#292056}
html[data-theme=dark] .code{background:#1a132f}
html[data-theme=dark] .cmd,html[data-theme=dark] pre.cmd{background:#1a1d26}
html[data-theme=dark] .warnbox{background:#0d0433;border:1px solid #221946;color:#9385b4}
html[data-theme=dark] .radio:has(input:checked){border-color:#403482;background:#0d0433}
html[data-theme=dark] .attach-btn{background:#171a24}
html[data-theme=dark] .mic.rec .ico-svg{color:#171717}
html[data-theme=dark] .icon-opt{background:#171717;color:#a3a7b6}
html[data-theme=dark] .icon-opt:hover{background:#171a27}
html[data-theme=dark] .swatch{border:2px solid #171717}
html[data-theme=dark] .icon-tab{background:#171717}
html[data-theme=dark] .v5 .section-t span:last-child{background:#191d2a}
html[data-theme=dark] .v5 .pc-warn{background:#3e2a05;color:#f3c46c}
html[data-theme=dark] .v5 .dot-off{background:#D97706}
html[data-theme=dark] .v5 .folder-t.sec-head{background:#171929;color:#a3a7b6}
html[data-theme=dark] .v5 .folder-t.sec-head:hover{background:#1a1e30}
html[data-theme=dark] .v5 .sec-head .ft-count{background:#171717}
html[data-theme=dark] .v5 .folder-body.indent{border-left:2px solid #1e2130}
html[data-theme=dark] .v5 .bot>summary:hover{background:#171929}
html[data-theme=dark] .v5 .bot[open]>summary{background:#130c35}
html[data-theme=dark] .v5 .bot-more:hover{background:#1f2235}
html[data-theme=dark] .v5 .chat-list{border-left:2px solid #181244}
html[data-theme=dark] .v5 .chat-list .newchat{border:1px dashed #1e1851}
html[data-theme=dark] .v5 .chat-list .newchat:hover{background:#130c35}
html[data-theme=dark] .v5 .chat-list .chat-item:hover{background:#171929}
html[data-theme=dark] .v5 .chat-list .chat-item.active{background:#150d40}
html[data-theme=dark] .bot-menu{background:#171717}
html[data-theme=dark] .bot-menu-h{border-bottom:1px solid #191d2a}
html[data-theme=dark] .bot-menu-i:hover,html[data-theme=dark] .bot-menu-i:focus-visible{background:#130c35}
html[data-theme=dark] .access-row{border:1px solid #262630;background:#171717}
html[data-theme=dark] .add-box{border-top:1px solid #262630}
html[data-theme=dark] .person-card{border:1px solid #262630;background:#101023}
html[data-theme=dark] .conv-btn.on{background:#2563eb;border-color:#2563eb}
html[data-theme=dark] .rail button{color:#7f8391}
html[data-theme=dark] .top .title .sub{color:#727684}
html[data-theme=dark] .top>button.ghost{color:#9398a7}
html[data-theme=dark] .top>button.ghost:hover{background:#1c1e27}
html[data-theme=dark] .composer .note{color:#646978}
html[data-theme=dark] .cbox{background:#171717}
html[data-theme=dark] .cbox button,html[data-theme=dark] .cbox .attach-btn,html[data-theme=dark] .cbox .mic,html[data-theme=dark] .cbox .conv-btn{color:#7f8391}
html[data-theme=dark] .cbox button:hover{background:#1c1e27}
html[data-theme=dark] .cbox .mic.rec{background:#DC2626;color:#171717}
html[data-theme=dark] .cbox .conv-btn.on{color:#171717}
html[data-theme=dark] .top{background:#171717}
html[data-theme=dark] .top .title .sub{color:#727684}
html[data-theme=dark] .top .model-chip:hover{background:#170e3e}
html[data-theme=dark] .top>button.icon-btn{color:#8b909e}
html[data-theme=dark] .top>button.icon-btn:hover{background:#1c1e27}
html[data-theme=dark] .perm-matrix td.self{color:#4f4f4f}
html[data-theme=dark] .deleg{background:#192a1d;border:1px solid #2a4230}
html[data-theme=dark] .deleg b{color:#8cc5a1}
html[data-theme=dark] .v5 .section-t .sec-add{background:#171717}
html[data-theme=dark] .v5 .sec-head .sec-more:hover,html[data-theme=dark] .v5 .sec-head .sec-more:focus-visible{background:#171717}
html[data-theme=dark] .toast-act{color:#171717}
html[data-theme=dark] .nav-badge{background:#B91C1C;color:#171717}
html[data-theme=dark] .quick-nav button{background:#171717}
html[data-theme=dark] .quick-nav button.on,html[data-theme=dark] .quick-nav button:hover{color:#92e9e2}
html[data-theme=dark] .segmented button{background:#171717}
html[data-theme=dark] .segmented button.on{color:#171717}
html[data-theme=dark] .chip{background:#191d2a;color:#a3a7b6}
html[data-theme=dark] .chip.st-trab{background:#1b3734;color:#92e9e2}
html[data-theme=dark] .chip.st-espera{background:#544508}
html[data-theme=dark] .chip.st-atraso{background:#3f0707}
html[data-theme=dark] .chip.st-libre{background:#191d2a;color:#a3a7b6}
html[data-theme=dark] .chip.count{background:#171717}
html[data-theme=dark] .org-ul{border-left:2px solid #272b36}
html[data-theme=dark] .org-card{border-left:4px solid #404653;background:#171717}
html[data-theme=dark] .org-card.st-trab{border-left-color:#7fe5dd}
html[data-theme=dark] .org-card.st-espera{border-left-color:#F59E0B}
html[data-theme=dark] .org-card.st-atraso{border-left-color:#DC2626}
html[data-theme=dark] .org-card:hover{background:#151a20}
html[data-theme=dark] .topic-row{background:#171717}
html[data-theme=dark] .topic-row.late{border-color:#6e0d0d}
html[data-theme=dark] .timeline{border-left:2px solid #272b36}
html[data-theme=dark] .office-tools button{background:#171717}
html[data-theme=dark] .office-wrap{background:#29271c}
html[data-theme=dark] .off-label{fill:#9a9990}
html[data-theme=dark] .off-dept{fill:#92e9e2}
html[data-theme=dark] .off-av{fill:#171717}
html[data-theme=dark] .off-name{fill:#c1c5d5;stroke:#171717}
html[data-theme=dark] .off-bd{fill:#171717}
html[data-theme=dark] .off-bot:focus-visible circle{stroke:#7fe5dd}
html[data-theme=dark] .plain-table th,html[data-theme=dark] .plain-table td{border-bottom:1px solid #20242f}
html[data-theme=dark] .company-bar{background:#171717}
html[data-theme=dark] .company-select{background:#171717}
html[data-theme=dark] .org-card.st-espera{border-left-color:#C78A00}
html[data-theme=dark] .v5 .bot8 .bot-open:hover{background:#171929}
html[data-theme=dark] .conv-row:hover{background:#161925}
html[data-theme=dark] .conv-more:hover{background:#1f2130}
html[data-theme=dark] .typing.live.esperando_aprobacion .live-dot{background:#B7791F}
html[data-theme=dark] .stop-btn{background:#171717 !important;border:1px solid #292d3a !important}
html[data-theme=dark] .ap-card{border:1px solid #6a5019;border-left:3px solid #B7791F}
html[data-theme=dark] .ap-card.risk-alto{background:#320404;border-color:#520808;border-left:3px solid #B42318}
html[data-theme=dark] .ap-card.risk-alto .ap-risk{color:#B42318;background:#3f0b07}
html[data-theme=dark] .ap-cmd{background:#171717}
html[data-theme=dark] .office-wrap{background:linear-gradient(#132a3d,#24341a)}
html[data-theme=dark] .off-label{fill:#9398ad}
html[data-theme=dark] .off-sign{fill:#4B3FD1}
html[data-theme=dark] .off-dept{fill:#4B3FD1;stroke:#171717}
html[data-theme=dark] .lb-bar{color:#171717}
html[data-theme=dark] .lb-btn{color:#171717}
html[data-theme=dark] .sys.fail{color:#B42318}
html[data-theme=dark] html[data-theme=dark] .office-tools button.fit{color:#110866;border-color:#150b8b;background:#c3c7d5}
@media (max-width:700px){
html[data-theme=dark] .office-tools button.fit{background:#171717}
}
@media (max-width:760px){
html[data-theme=dark] .top>button.back{color:#8b909e}
}

/* --- sección manual: variables y ajustes del tema oscuro (v9 ronda 3) --- */
html[data-theme=dark]{
  color-scheme:dark;
  --brand:#8B80FF;--brand-ink:#12102B;--brand-soft:#26224F;--brand-dark:#B7B0FF;--soft:#26224F;
  --ink:#E7E8F0;--ink-2:#B9BDD0;--line:#33374A;--bg:#12141C;--panel:#1B1E29;--rail:#171923;--control:#8A8FA6;
  --bot:#262347;--bot-line:#3B3670;--me:#4B3FD1;
  --ok:#7DD3A6;--ok-bg:#16301F;--warn:#F3C969;--warn-bg:#3A2E10;--bad:#FF9AA0;--bad-bg:#3C1A1E;
  --info:#93B4FF;--info-bg:#1B2A52;--blue:#9DB8FF;--blue-bg:#1B2A52;--st-espera:#F3C969;--st-atraso:#FF9AA0;
  color:var(--ink);background:var(--bg);
}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#1B1E29;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] ::placeholder{color:#8A8FA6}
html[data-theme=dark] .bubble.me,html[data-theme=dark] .msg.me .bubble{background:#4B3FD1;color:#fff}
html[data-theme=dark] button.primary{background:#5B4FE0;color:#fff;border-color:#5B4FE0}
html[data-theme=dark] .office-svg{background:#121626}
html[data-theme=dark] .off-label{fill:#C9CDE0;stroke:rgba(18,22,38,.85)}
html[data-theme=dark] .off-name{fill:#E7E8F0;stroke:#121626}
html[data-theme=dark] .off-dept{fill:#B7B0FF;stroke:#121626}
html[data-theme=dark] .off-sign{fill:#B7B0FF}
html[data-theme=dark] .top{background:var(--panel);border-color:var(--line)}
@media (prefers-color-scheme:dark){html:not([data-theme]){color-scheme:dark}}
.theme-opt{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0}
.theme-opt button{min-height:44px;flex:1 1 90px}
.theme-opt button[aria-pressed=true]{border-color:var(--brand);box-shadow:inset 0 0 0 2px var(--brand);font-weight:700}
html[data-theme=dark] .hint,html[data-theme=dark] .sub,html[data-theme=dark] .quick-nav button{color:#B9BDD0}
.off-av,html[data-theme=dark] .off-av{fill:#2A2D40!important}

/* ronda 5: contraste 4.5:1 sobre fondos rojos */
html[data-theme=dark] .nav-badge,html[data-theme=dark] .cbox .mic.rec{color:#fff}
html[data-theme=dark] .nav-badge{background:#C62828}
/* v12 ronda 7: caja de escribir y buscador sin cajas dentro de cajas en oscuro */
html[data-theme=dark] .cbox textarea,html[data-theme=dark] .cbox textarea:focus{border:0;background:transparent;box-shadow:none}
html[data-theme=dark] .cbox button,html[data-theme=dark] .cbox .attach-btn,html[data-theme=dark] .cbox .mic,html[data-theme=dark] .cbox .conv-btn{background:transparent;border:0}
html[data-theme=dark] .cbox .mic.rec{background:#DC2626}html[data-theme=dark] .cbox .conv-btn.on{background:var(--brand,#4B3FD1)}
html[data-theme=dark] .search-entry button{background:transparent;border:0}

/* v12 r8: pestaña activa visible en oscuro (antes quedaba oscuro sobre oscuro) + texto secundario con más contraste */
html[data-theme=dark] .segmented button.on{background:#6354df;color:#fff;opacity:1}
html[data-theme=dark] .hint,html[data-theme=dark] .sub,html[data-theme=dark] .sub-bot,html[data-theme=dark] .bb-ca,html[data-theme=dark] .bb-cn,html[data-theme=dark] .bb-m,html[data-theme=dark] .conv-p,html[data-theme=dark] .conv-d,html[data-theme=dark] .rail button{color:#b8bfce}
html[data-theme=dark] .rail button.on,html[data-theme=dark] .rail button[aria-current=page]{color:#fff}
