/* ============================================================
   ADKO ADMIN · UI V2.0 · 2026-09-23
   Tres identidades visuales centralizadas:
   - system: ADKO original / Base Solvente
   - dark: monocromático estricto
   - light: ADKO Base Agua
   Esta capa se carga al final del <head> y NO modifica lógica.
   ============================================================ */

:root{
  --adko-searchbar-height:58px;
  --adko-ui-radius:12px;
  --adko-ui-radius-sm:8px;
  --adko-ui-transition:.16s ease;
}

html[data-adko-theme="system"]{
  color-scheme:dark;
  --adko-v2-bg:#0d0d0c;
  --adko-v2-surface:#171613;
  --adko-v2-surface-2:#121210;
  --adko-v2-surface-3:#1d1b19;
  --adko-v2-top:#0d0d0c;
  --adko-v2-text:#f6f4ef;
  --adko-v2-muted:#aaa49c;
  --adko-v2-faint:#77716a;
  --adko-v2-line:#34312d;
  --adko-v2-line-strong:#4a4640;
  --adko-v2-input:#171613;
  --adko-v2-accent:#c1761b;
  --adko-v2-accent-strong:#d79a4d;
  --adko-v2-accent-soft:rgba(193,118,27,.12);
  --adko-v2-on-accent:#11110f;
  --adko-v2-shadow:0 14px 36px rgba(0,0,0,.30);
  --adko-v2-success:#79aa82;
  --adko-v2-info:#6f9fbd;
  --adko-v2-warning:#d7b26a;
  --adko-v2-danger:#d78378;
  --adko-v2-success-bg:#14251a;
  --adko-v2-info-bg:#12202a;
  --adko-v2-warning-bg:#241d11;
  --adko-v2-danger-bg:#2a1717;
}

html[data-adko-theme="dark"]{
  color-scheme:dark;
  --adko-v2-bg:#070707;
  --adko-v2-surface:#111111;
  --adko-v2-surface-2:#171717;
  --adko-v2-surface-3:#1d1d1d;
  --adko-v2-top:#090909;
  --adko-v2-text:#f5f5f5;
  --adko-v2-muted:#b9b9b9;
  --adko-v2-faint:#858585;
  --adko-v2-line:#333333;
  --adko-v2-line-strong:#555555;
  --adko-v2-input:#151515;
  --adko-v2-accent:#ededed;
  --adko-v2-accent-strong:#ffffff;
  --adko-v2-accent-soft:rgba(255,255,255,.08);
  --adko-v2-on-accent:#080808;
  --adko-v2-shadow:0 16px 42px rgba(0,0,0,.44);
  --adko-v2-success:#f0f0f0;
  --adko-v2-info:#d0d0d0;
  --adko-v2-warning:#aaaaaa;
  --adko-v2-danger:#818181;
  --adko-v2-success-bg:#151515;
  --adko-v2-info-bg:#141414;
  --adko-v2-warning-bg:#131313;
  --adko-v2-danger-bg:#121212;
}

html[data-adko-theme="light"]{
  color-scheme:light;
  --adko-v2-bg:#f2f7f7;
  --adko-v2-surface:#ffffff;
  --adko-v2-surface-2:#f6f4ef;
  --adko-v2-surface-3:#e9f2f2;
  --adko-v2-top:#ffffff;
  --adko-v2-text:#07383b;
  --adko-v2-muted:#4d6769;
  --adko-v2-faint:#75898b;
  --adko-v2-line:#bfd2d3;
  --adko-v2-line-strong:#91b2b5;
  --adko-v2-input:#ffffff;
  --adko-v2-accent:#006d77;
  --adko-v2-accent-strong:#07545b;
  --adko-v2-accent-soft:#e3f0f1;
  --adko-v2-on-accent:#ffffff;
  --adko-v2-shadow:0 12px 34px rgba(0,77,84,.12);
  --adko-v2-success:#2e7165;
  --adko-v2-info:#315f76;
  --adko-v2-warning:#80642c;
  --adko-v2-danger:#8f4545;
  --adko-v2-success-bg:#e9f4ef;
  --adko-v2-info-bg:#eaf2f6;
  --adko-v2-warning-bg:#f7f2e6;
  --adko-v2-danger-bg:#f8eaea;
}

/* Sincroniza variables históricas utilizadas por módulos viejos y nuevos. */
html[data-adko-theme]:not([data-adko-theme="system"]){
  --bg:var(--adko-v2-bg)!important;
  --panel:var(--adko-v2-surface)!important;
  --panel2:var(--adko-v2-surface-2)!important;
  --ivory:var(--adko-v2-text)!important;
  --muted:var(--adko-v2-muted)!important;
  --line:var(--adko-v2-line)!important;
  --amber:var(--adko-v2-accent)!important;
  --amber2:var(--adko-v2-accent-strong)!important;
  --green:var(--adko-v2-success)!important;
  --blue:var(--adko-v2-info)!important;
  --yellow:var(--adko-v2-warning)!important;
  --red:var(--adko-v2-danger)!important;
  --bg0:var(--adko-v2-bg)!important;
  --bg1:var(--adko-v2-surface)!important;
  --bg2:var(--adko-v2-surface-2)!important;
  --card:var(--adko-v2-surface)!important;
  --card2:var(--adko-v2-surface-2)!important;
  --text:var(--adko-v2-text)!important;
  --text2:var(--adko-v2-muted)!important;
  --accent:var(--adko-v2-accent)!important;
}

html[data-adko-theme]:not([data-adko-theme="system"]) body{
  background:var(--adko-v2-bg)!important;
  color:var(--adko-v2-text)!important;
  transition:background-color var(--adko-ui-transition),color var(--adko-ui-transition);
}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.app,.view,.view.active,main,.content,#view-inicio,.home,.wrap,.page,.page-shell,.main,.workspace){
  color:var(--adko-v2-text);
}
html[data-adko-theme="light"] :is(.app,.view,.view.active,main,.content,#view-inicio,.home,.wrap,.page,.page-shell,.main,.workspace){background-color:var(--adko-v2-bg)!important;background-image:none!important}
html[data-adko-theme="dark"] :is(.app,.view,.view.active,main,.content,#view-inicio,.home,.wrap,.page,.page-shell,.main,.workspace){background-color:var(--adko-v2-bg)!important;background-image:none!important}

/* ============================================================
   Barra global superior: SIEMPRE por encima del header.
   ============================================================ */
.adko-global-search{
  position:sticky!important;
  top:0!important;
  z-index:12000!important;
  width:100%!important;
  min-height:var(--adko-searchbar-height)!important;
  padding:9px 18px!important;
  margin:0!important;
  border-bottom:1px solid var(--adko-v2-line)!important;
  background:var(--adko-v2-top)!important;
  box-shadow:0 5px 18px rgba(0,0,0,.08)!important;
}
.adko-global-search-inner{width:min(1180px,100%)!important;margin:0 auto!important;position:relative!important}
.adko-global-search-box{height:40px!important;display:grid!important;grid-template-columns:auto 1fr auto!important;align-items:center!important;gap:10px!important;border:1px solid var(--adko-v2-line-strong)!important;border-radius:999px!important;background:var(--adko-v2-input)!important;color:var(--adko-v2-text)!important;padding:0 14px!important;box-shadow:none!important}
.adko-global-search-box:focus-within{border-color:var(--adko-v2-accent)!important;box-shadow:0 0 0 3px var(--adko-v2-accent-soft)!important}
.adko-global-search-box input{width:100%!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:var(--adko-v2-text)!important;padding:0!important;box-shadow:none!important;font-size:12px!important}
.adko-global-search-box input::placeholder{color:var(--adko-v2-muted)!important;opacity:1!important}
.adko-global-search-icon{color:var(--adko-v2-accent)!important;font-size:18px!important;font-weight:900!important}
.adko-global-search-shortcut{color:var(--adko-v2-muted)!important;border:1px solid var(--adko-v2-line)!important;border-radius:6px!important;padding:3px 6px!important;font-size:9px!important;background:var(--adko-v2-surface-2)!important}
.adko-global-search-results{position:absolute!important;left:0!important;right:0!important;top:47px!important;z-index:12100!important;background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important;border:1px solid var(--adko-v2-line)!important;border-radius:12px!important;box-shadow:var(--adko-v2-shadow)!important;overflow:auto!important;max-height:min(62vh,520px)!important;padding:6px!important}
.adko-global-search-result{display:block!important;padding:10px 12px!important;border-radius:8px!important;color:var(--adko-v2-text)!important;text-decoration:none!important;border:1px solid transparent!important;background:transparent!important}
.adko-global-search-result:hover,.adko-global-search-result:focus{background:var(--adko-v2-accent-soft)!important;border-color:var(--adko-v2-line)!important;outline:0!important}
.adko-global-search-result-top{display:flex!important;align-items:center!important;gap:8px!important;justify-content:space-between!important}.adko-global-search-type{color:var(--adko-v2-accent)!important;font-weight:900!important;font-size:9px!important}.adko-global-search-party{color:var(--adko-v2-text)!important;margin-top:4px!important}.adko-global-search-meta,.adko-global-search-empty{color:var(--adko-v2-muted)!important;font-size:10px!important;padding:8px!important}

/* Header/nav siempre debajo de la búsqueda. */
html.adko-has-global-search :is(.header,.top){top:var(--adko-searchbar-height)!important;z-index:11000!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.header,.top){background:var(--adko-v2-top)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.header,.top) :is(a,button,.brand,.logo,.nav-main){color:var(--adko-v2-text)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.header,.top) :is(.user-pill,.read-only-badge,.notif-link){background:var(--adko-v2-surface)!important;color:var(--adko-v2-muted)!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .notif-link{color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.nav button.active,.nav .nav-main.active,.nav a.active){color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.nav button.active,.nav .nav-main.active)::after{background:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .nav-chevron{color:var(--adko-v2-muted)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.nav-dropdown,.nav-dropdown-right,.dropdown-menu,.menu-dropdown,.submenu,.context-menu){background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;box-shadow:var(--adko-v2-shadow)!important;z-index:11500!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.nav-dropdown,.dropdown-menu,.menu-dropdown,.submenu,.context-menu) :is(a,button){color:var(--adko-v2-text)!important;background:transparent!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.nav-dropdown,.dropdown-menu,.menu-dropdown,.submenu,.context-menu) :is(a,button):hover{background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-text)!important}

/* Selector de tema: por encima de nav y debajo de búsqueda de resultados. */
.adko-theme-picker{z-index:11900!important}.adko-theme-picker[open]{z-index:11950!important}.adko-theme-picker summary{background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important}.adko-theme-menu{z-index:11980!important;background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;box-shadow:var(--adko-v2-shadow)!important}.adko-theme-option{color:var(--adko-v2-text)!important;background:transparent!important}.adko-theme-option:hover,.adko-theme-option[aria-checked="true"]{background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-text)!important}.adko-theme-option[aria-checked="true"]{box-shadow:inset 3px 0 0 var(--adko-v2-accent)!important}

/* Componentes de superficie. */
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.card,.box,.panel,.panelbox,.dashboard-card,.section,.metric,.kpi,.stat-card,.tablewrap,.toolbar,.filters,.filterbar,.openbox,.summary-card,.module-card,.tile,.widget,.modal-content,.dialog,.drawer,.sheet,.person,.closecard){background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.card,.box,.panel,.panelbox,.dashboard-card,.section,.metric,.kpi,.stat-card,.tablewrap,.summary-card,.module-card,.tile,.widget,.modal-content,.dialog,.drawer,.sheet,.person,.closecard){box-shadow:0 1px 2px rgba(0,0,0,.03),var(--adko-v2-shadow)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.notice,.callout,.simple-row,.email-row,.activity,.visit,.empty,.quick,.result,.react-form,.edit-task,.leftovers,.stat,.person-head){background:var(--adko-v2-surface-2)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(hr,.separator,.divider){border-color:var(--adko-v2-line)!important;background:var(--adko-v2-line)!important}

/* Tipografía y contraste. */
html[data-adko-theme]:not([data-adko-theme="system"]) :is(h1,h2,h3,h4,h5,h6,strong,b,.title,.name,.brand,.section-title,.card-title){color:var(--adko-v2-text)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.muted,.sub,.subtitle,.meta,.mini-text,.desc,.description,.details,.hint,.small,.email,.role,.task-meta,.reacted,.progresslabel,.state-line,.intro,.section-intro){color:var(--adko-v2-muted)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.ey,.eyebrow,.accent,.role,.section-kicker){color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) a:not(.btn):not(.button):not(.nav-main):not(.adko-global-search-result){color:var(--adko-v2-accent)!important}

/* Formularios. */
html[data-adko-theme]:not([data-adko-theme="system"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea,.input,.select){background:var(--adko-v2-input)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line-strong)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(input,select,textarea)::placeholder{color:var(--adko-v2-faint)!important;opacity:1!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(input,select,textarea):focus{outline:none!important;border-color:var(--adko-v2-accent)!important;box-shadow:0 0 0 3px var(--adko-v2-accent-soft)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) option{background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important}

/* Botones y cápsulas. */
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.btn,.button,.mini,button:not(.nav-main):not(.adko-theme-option):not(.adko-toast-close)){border-color:var(--adko-v2-line-strong)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.btn:not(.primary):not(.danger):not(.good):not(.green):not(.blue):not(.red),.button:not(.primary):not(.danger),.mini:not(.primary):not(.green):not(.blue):not(.red)){background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.btn.primary,.button.primary,.mini.primary,.primary-action,.cta){background:var(--adko-v2-accent)!important;color:var(--adko-v2-on-accent)!important;border-color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.tag,.badge,.pill,.chip,.capsule,.status,.file-pill,.tab){background:var(--adko-v2-surface-2)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important}

/* Tablas. */
html[data-adko-theme]:not([data-adko-theme="system"]) :is(table,thead,tbody,tr,td,th){border-color:var(--adko-v2-line)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) th{background:var(--adko-v2-surface-2)!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) td{color:var(--adko-v2-text)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) tbody tr:hover td{background:var(--adko-v2-accent-soft)!important}

/* Estados semánticos. */
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.ok,.good,.success,.done,.green,.pill.done,.mini.green,.alert-success,.flash-success){border-color:var(--adko-v2-success)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.ok,.good,.success,.alert-success,.flash-success){background:var(--adko-v2-success-bg)!important;color:var(--adko-v2-success)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.progress,.blue,.info,.mini.blue,.pill.progress){border-color:var(--adko-v2-info)!important;color:var(--adko-v2-info)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.warning,.warn,.wait,.yellow,.pill.wait,.alert-warning,.flash-warning){border-color:var(--adko-v2-warning)!important;color:var(--adko-v2-warning)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.err,.error,.danger,.bad,.miss,.red,.mini.red,.pill.miss,.alert-danger,.alert-error,.flash-error){border-color:var(--adko-v2-danger)!important;color:var(--adko-v2-danger)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) :is(.err,.error,.danger,.bad,.alert-danger,.alert-error,.flash-error){background:var(--adko-v2-danger-bg)!important}

/* Pizarra V4.3: mantiene estados legibles en los tres modos. */
html[data-adko-theme]:not([data-adko-theme="system"]) .task{background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;border-left-color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .task.done{border-left-color:var(--adko-v2-success)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .task.progress{border-left-color:var(--adko-v2-info)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .task.wait{border-left-color:var(--adko-v2-warning)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .task.miss{border-left-color:var(--adko-v2-danger)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .over-row{background:var(--adko-v2-surface-2)!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) .progressbar{background:var(--adko-v2-line)!important}.progressbar i{background:var(--adko-v2-success)!important}

/* Oscuro monocromático estricto: sin acentos cromáticos en UI CSS. */
html[data-adko-theme="dark"] :is(.ey,.eyebrow,.accent,.role,.section-kicker,a:not(.btn):not(.button),.notif-link,.adko-global-search-icon,.adko-global-search-type,th){color:var(--adko-v2-accent)!important}
html[data-adko-theme="dark"] :is(.ok,.good,.success,.done,.green,.progress,.blue,.info,.warning,.warn,.wait,.yellow,.err,.error,.danger,.bad,.miss,.red,.mini.green,.mini.blue,.mini.red,.pill.done,.pill.progress,.pill.wait,.pill.miss){background:var(--adko-v2-surface-2)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line-strong)!important}
html[data-adko-theme="dark"] .task.done{border-left:5px solid #f0f0f0!important}
html[data-adko-theme="dark"] .task.progress{border-left:5px dashed #cfcfcf!important}
html[data-adko-theme="dark"] .task.wait{border-left:5px dotted #ababab!important}
html[data-adko-theme="dark"] .task.miss{border-left:6px double #848484!important}
html[data-adko-theme="dark"] :is(.pill.done,.mini.green){border-style:solid!important}
html[data-adko-theme="dark"] :is(.pill.progress,.mini.blue){border-style:dashed!important}
html[data-adko-theme="dark"] .pill.wait{border-style:dotted!important}
html[data-adko-theme="dark"] :is(.pill.miss,.mini.red){border-style:double!important}
html[data-adko-theme="dark"] .cancel{opacity:.58!important;filter:grayscale(1)!important}

/* Claro Base Agua: estructura blanca/petróleo; el ámbar histórico no se usa como acento estructural. */
html[data-adko-theme="light"] :is(.header,.top,.adko-global-search){box-shadow:0 1px 0 rgba(0,77,84,.04),0 8px 22px rgba(0,77,84,.06)!important}
html[data-adko-theme="light"] :is(.card,.box,.panel,.panelbox,.dashboard-card,.section,.metric,.kpi,.stat-card,.tablewrap,.summary-card,.module-card,.tile,.widget,.person,.closecard){box-shadow:0 1px 2px rgba(0,77,84,.05),0 8px 22px rgba(0,77,84,.055)!important}

/* Runtime normalizer: atributos añadidos por adko-ui-v2.js. */
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-bg="surface"]{background:var(--adko-v2-surface)!important;background-image:none!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-bg="surface2"]{background:var(--adko-v2-surface-2)!important;background-image:none!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-bg="bg"]{background:var(--adko-v2-bg)!important;background-image:none!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-color="text"]{color:var(--adko-v2-text)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-color="muted"]{color:var(--adko-v2-muted)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-color="accent"]{color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-border="line"]{border-color:var(--adko-v2-line)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-border="accent"]{border-color:var(--adko-v2-accent)!important}
html[data-adko-theme]:not([data-adko-theme="system"]) [data-adko-v2-contrast="text"]{color:var(--adko-v2-text)!important;text-shadow:none!important}

/* Toasts globales. */
.adko-toast-stack{z-index:12500!important}.adko-toast{background:var(--adko-v2-surface)!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;box-shadow:var(--adko-v2-shadow)!important}.adko-toast-copy strong{color:var(--adko-v2-text)!important}.adko-toast-text{color:var(--adko-v2-muted)!important}.adko-toast-close{color:var(--adko-v2-muted)!important}

/* Scrollbars discretas por identidad. */
html[data-adko-theme]:not([data-adko-theme="system"]) *{scrollbar-color:var(--adko-v2-line-strong) var(--adko-v2-bg)}

@media(max-width:760px){
  :root{--adko-searchbar-height:56px}
  .adko-global-search{padding:8px 10px!important}
  .adko-global-search-inner{width:100%!important}
  .adko-global-search-shortcut{display:none!important}
  .adko-global-search-box{grid-template-columns:auto 1fr!important;height:40px!important}
  html.adko-has-global-search .header{top:var(--adko-searchbar-height)!important}
  html.adko-has-global-search .top{top:var(--adko-searchbar-height)!important}
}

@media print{
  .adko-global-search,.adko-theme-picker,.adko-toast-stack{display:none!important}
}

/* ============================================================
   ADKO ADMIN · UI V2.0.1 · 2026-09-23
   Afinación FINAL exclusiva de MODO CLARO / Base Agua.
   - Corrige cápsulas/botones negros heredados.
   - Elimina residuos ámbar/naranja estructurales en Claro.
   - Normaliza visualmente ADKO IA sin tocar Sistema ni Oscuro.
   ============================================================ */

/* --- Cápsulas, acciones y estados de Pizarra/Equipo Hoy --- */
html[data-adko-theme="light"] :is(.mini.green,.btn.green,.button.green){
  background:var(--adko-v2-success-bg)!important;
  color:#245f55!important;
  border-color:#8eb9b0!important;
}
html[data-adko-theme="light"] :is(.mini.blue,.btn.blue,.button.blue){
  background:var(--adko-v2-info-bg)!important;
  color:#28566d!important;
  border-color:#9ab8c7!important;
}
html[data-adko-theme="light"] :is(.mini.red,.btn.red,.button.red,.btn.danger,.button.danger){
  background:var(--adko-v2-danger-bg)!important;
  color:#873f3f!important;
  border-color:#d7aaaa!important;
}
html[data-adko-theme="light"] :is(.pill.done,.badge.done,.status.done){
  background:var(--adko-v2-success-bg)!important;color:#245f55!important;border-color:#8eb9b0!important;
}
html[data-adko-theme="light"] :is(.pill.progress,.badge.progress,.status.progress){
  background:var(--adko-v2-info-bg)!important;color:#28566d!important;border-color:#9ab8c7!important;
}
html[data-adko-theme="light"] :is(.pill.wait,.badge.wait,.status.wait){
  background:var(--adko-v2-warning-bg)!important;color:#6f5729!important;border-color:#d4c59e!important;
}
html[data-adko-theme="light"] :is(.pill.miss,.badge.miss,.status.miss){
  background:var(--adko-v2-danger-bg)!important;color:#873f3f!important;border-color:#d7aaaa!important;
}
html[data-adko-theme="light"] .task.cancel :is(.mini,.btn,.pill){
  background:#f4f6f6!important;color:#718083!important;border-color:#cedadb!important;
}
html[data-adko-theme="light"] .task-actions :is(.mini,.btn),
html[data-adko-theme="light"] .react-actions :is(.mini,.btn){box-shadow:none!important}

/* --- Restos históricos ámbar en Inicio / tarjetas generales --- */
html[data-adko-theme="light"] .ai-home-pill{
  background:linear-gradient(135deg,#ffffff 0%,#f6f4ef 52%,#e7f1f1 100%)!important;
  border-color:#7faeb2!important;
  box-shadow:0 12px 28px rgba(0,77,84,.10)!important;
}
html[data-adko-theme="light"] .ai-home-pill:hover{
  background:linear-gradient(135deg,#ffffff 0%,#eef6f6 52%,#dceced 100%)!important;
  border-color:var(--adko-v2-accent)!important;
}
html[data-adko-theme="light"] .ai-home-pill :is(.ai-home-eyebrow,.ai-home-open){color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .ai-home-title-row strong{color:var(--adko-v2-text)!important}
html[data-adko-theme="light"] .ai-home-badge{
  background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-accent)!important;border-color:#79aeb2!important;
}
html[data-adko-theme="light"] .ai-home-copy p{color:var(--adko-v2-muted)!important}
html[data-adko-theme="light"] :is(.copy-status,.pending,.open-state){color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .callout{background:var(--adko-v2-accent-soft)!important;border-color:#a7c6c8!important;color:var(--adko-v2-muted)!important}
html[data-adko-theme="light"] .card-link:hover{background:var(--adko-v2-accent-soft)!important;border-color:#88b2b5!important}

/* --- ADKO IA · Base Agua completo en Claro --- */
html[data-adko-theme="light"] body:has(.app .side):has(.main){background:var(--adko-v2-bg)!important}
html[data-adko-theme="light"] .side{
  background:linear-gradient(180deg,#f8fbfb 0%,#eef5f5 100%)!important;
  color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;
  box-shadow:0 10px 28px rgba(0,77,84,.08)!important;
}
html[data-adko-theme="light"] .main{
  background:#ffffff!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;
  box-shadow:0 10px 28px rgba(0,77,84,.07)!important;
}
html[data-adko-theme="light"] :is(.chip,.side-toggle,.mark,.starter,.rename-actions button,.voice-record,.voice-action){
  background:#ffffff!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;
}
html[data-adko-theme="light"] :is(.ai,.mark span){
  background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-accent)!important;border-color:#80afb3!important;
}
html[data-adko-theme="light"] .new,
html[data-adko-theme="light"] .send,
html[data-adko-theme="light"] .rename-actions .save,
html[data-adko-theme="light"] .voice-action.accept{
  background:var(--adko-v2-accent)!important;color:#ffffff!important;border-color:var(--adko-v2-accent)!important;
}
html[data-adko-theme="light"] :is(.thread-group>summary,.thread-group>summary::before,.thread-group>summary span,.thread-more,.side-foot){color:var(--adko-v2-muted)!important}
html[data-adko-theme="light"] .thread{color:var(--adko-v2-text)!important}
html[data-adko-theme="light"] :is(.thread-row:hover,.thread-row.on){background:var(--adko-v2-accent-soft)!important;border-color:#b3cdcf!important}
html[data-adko-theme="light"] .thread-more:hover{background:#dcebec!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .thread-menu{background:#ffffff!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;box-shadow:var(--adko-v2-shadow)!important}
html[data-adko-theme="light"] .thread-menu button{color:var(--adko-v2-text)!important}
html[data-adko-theme="light"] .thread-menu button:hover{background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .thread-menu button.danger{color:var(--adko-v2-danger)!important}
html[data-adko-theme="light"] .rename-modal{background:rgba(7,56,59,.22)!important}
html[data-adko-theme="light"] .rename-card{background:#ffffff!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;box-shadow:var(--adko-v2-shadow)!important}
html[data-adko-theme="light"] .rename-card p{color:var(--adko-v2-muted)!important}
html[data-adko-theme="light"] .rename-card input{background:#ffffff!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line-strong)!important}
html[data-adko-theme="light"] :is(.intro p,.welcome p){color:var(--adko-v2-muted)!important}
html[data-adko-theme="light"] .starter:hover{background:var(--adko-v2-accent-soft)!important;border-color:#8db5b8!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .msg.user .bubble{
  background:#e4f0f1!important;color:var(--adko-v2-text)!important;border-color:#9fc0c3!important;
}
html[data-adko-theme="light"] .msg.assistant .bubble{
  background:#ffffff!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important;
}
html[data-adko-theme="light"] .msg.assistant .bubble :is(h2,h3,h4,strong,em){color:var(--adko-v2-text)!important}
html[data-adko-theme="light"] .msg.assistant .bubble h3,
html[data-adko-theme="light"] .msg.assistant .bubble a,
html[data-adko-theme="light"] .msg.assistant .bubble .ai-media-link{color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .msg.assistant .bubble :is(code,pre){background:#f3f7f7!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme="light"] .msg.assistant .bubble pre code{background:transparent!important}
html[data-adko-theme="light"] .msg.assistant .bubble blockquote{background:#eef5f5!important;color:var(--adko-v2-muted)!important;border-left-color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .msg.assistant .bubble th{background:#e8f1f1!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .msg-tool{color:var(--adko-v2-muted)!important}
html[data-adko-theme="light"] .msg-tool:hover{background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .msg-tool.active{background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .msg-tool.negative.active{background:var(--adko-v2-danger-bg)!important;color:var(--adko-v2-danger)!important}
html[data-adko-theme="light"] .export-chip{background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-accent)!important;border-color:#a0c0c3!important}
html[data-adko-theme="light"] .composer{background:#ffffff!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme="light"] textarea{background:#ffffff!important;color:var(--adko-v2-text)!important;border-color:var(--adko-v2-line-strong)!important}
html[data-adko-theme="light"] textarea:focus{border-color:var(--adko-v2-accent)!important;box-shadow:0 0 0 3px var(--adko-v2-accent-soft)!important}
html[data-adko-theme="light"] .voice-record:hover{background:var(--adko-v2-accent-soft)!important;color:var(--adko-v2-accent)!important;border-color:#8db5b8!important}
html[data-adko-theme="light"] .voice-capture{background:#f5f9f9!important;color:var(--adko-v2-text)!important;border-color:#a2c1c3!important}
html[data-adko-theme="light"] :is(.voice-time,.voice-transcribing){color:var(--adko-v2-text)!important}
html[data-adko-theme="light"] :is(.voice-dot,.voice-wave i,.voice-spinner){background-color:var(--adko-v2-accent)!important;border-top-color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .hint{color:var(--adko-v2-muted)!important}
html[data-adko-theme="light"] .voice-status{color:var(--adko-v2-accent)!important}

/* Header específico de IA: elimina últimas transparencias oscuras/ámbar en Claro. */
html[data-adko-theme="light"] .top{background:#ffffff!important;border-color:var(--adko-v2-line)!important}
html[data-adko-theme="light"] a.chip:hover{background:var(--adko-v2-accent-soft)!important;border-color:#8db5b8!important;color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .chip.status.on{background:var(--adko-v2-success-bg)!important;color:#245f55!important;border-color:#9fc4bc!important}
html[data-adko-theme="light"] .chip.status.off{background:var(--adko-v2-danger-bg)!important;color:#873f3f!important;border-color:#dbb2b2!important}

/* Garantía final: en Claro no reutilizar gradientes de Base Solvente en superficies comunes. */
html[data-adko-theme="light"] :is(.ai-home-pill,.side,.main,.composer,.thread-menu,.rename-card){background-image:none!important}
html[data-adko-theme="light"] .ai-home-pill{background-image:linear-gradient(135deg,#ffffff 0%,#f6f4ef 52%,#e7f1f1 100%)!important}
html[data-adko-theme="light"] .side{background-image:linear-gradient(180deg,#f8fbfb 0%,#eef5f5 100%)!important}

/* ============================================================
   ADKO ADMIN · UI V2.0.2 FINAL · 2026-09-23
   Cierre visual exclusivo de MODO CLARO / Base Agua.
   - Elimina residuos ámbar decorativos restantes.
   - Activos/HOY/Google/primarios usan azul petróleo.
   - Conserva advertencias reales en ocre suave semántico.
   - NO modifica Sistema ni Oscuro.
   ============================================================ */

/* Acciones y pestañas activas: petróleo, nunca ámbar decorativo. */
html[data-adko-theme="light"] :is(
  .scope-tabs a.active,
  .tab.active,
  .btn.active,
  .btn.primary,
  .mini.primary,
  button.primary,
  a.primary,
  .overdue-alert .btn
){
  background:var(--adko-v2-accent)!important;
  background-image:none!important;
  color:#ffffff!important;
  border-color:var(--adko-v2-accent)!important;
  box-shadow:none!important;
}
html[data-adko-theme="light"] :is(
  .scope-tabs a.active,
  .tab.active,
  .btn.active,
  .btn.primary,
  .mini.primary,
  button.primary,
  a.primary
):hover{
  filter:brightness(.94)!important;
  color:#ffffff!important;
}

/* Google Calendar: llamada a conectar/entrar debe seguir Base Agua en Claro. */
html[data-adko-theme="light"] :is(
  a[href*="google_calendar_connect.php"],
  a.btn[href*="google_calendar.php"],
  a.btn[href*="google_calendar_connect.php"]
){
  border-color:var(--adko-v2-accent)!important;
}
html[data-adko-theme="light"] :is(
  a.btn.primary[href*="google_calendar"],
  a[href*="google_calendar_connect.php"].primary
){
  background:var(--adko-v2-accent)!important;
  color:#ffffff!important;
  border-color:var(--adko-v2-accent)!important;
}
html[data-adko-theme="light"] .who a[href*="google_calendar"]{
  color:var(--adko-v2-accent)!important;
  text-decoration-color:rgba(0,109,119,.35)!important;
}

/* Residuos decorativos históricos de Pizarra/Equipo Hoy. */
html[data-adko-theme="light"] :is(
  .box-title,
  .reprogram-box summary,
  .prefs-box summary,
  .cancel-box summary,
  .reacted
){color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .avatar-form{
  background:var(--adko-v2-accent)!important;
  color:#ffffff!important;
  border-color:#ffffff!important;
}
html[data-adko-theme="light"] .progressbar i{background:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] .task:not(.done):not(.progress):not(.miss):not(.cancel){border-left-color:var(--adko-v2-accent)!important}

/* Advertencia auténtica: conserva diferenciación, pero sin naranja de marca Solvente. */
html[data-adko-theme="light"] :is(.over-row .days,.warning-text,.warn-text){color:#6f5729!important}
html[data-adko-theme="light"] :is(.warning,.warn,.alert-warning){
  background:var(--adko-v2-warning-bg)!important;
  color:#6f5729!important;
  border-color:#d4c59e!important;
}

/* Tablas y microetiquetas que aún heredaban tonos dorados directos. */
html[data-adko-theme="light"] .tablewrap th{color:var(--adko-v2-accent)!important}
html[data-adko-theme="light"] :is(.role,.ey,.eyebrow,.section-kicker){color:var(--adko-v2-accent)!important}

/* Garantía: las superficies/acciones estructurales seleccionadas no reutilizan gradiente ámbar. */
html[data-adko-theme="light"] :is(
  .scope-tabs a.active,
  .tab.active,
  .btn.active,
  .btn.primary,
  .mini.primary,
  button.primary,
  a.primary,
  .avatar-form,
  .progressbar i
){background-image:none!important}


/* ============================================================
   ADKO ADMIN · UI V2.0.3 CONTRASTE FINAL · 2026-09-23
   Ajuste localizado exclusivo de MODO CLARO / Base Agua.
   - Toda cápsula/acción rellena en petróleo fuerza texto blanco.
   - Google / Sincronizar Google abandona ámbar decorativo.
   - Refuerza HOY, tabs activos y primarios contra CSS local heredado.
   - NO modifica Sistema ni Oscuro.
   ============================================================ */

/* Contraste absoluto para controles seleccionados / primarios en Claro. */
html[data-adko-theme="light"] body :is(
  .scope-tabs a.active,
  .tabs .btn.active,
  .tab.active,
  .dates .btn.primary,
  .btn.primary,
  button.btn.primary,
  a.btn.primary,
  .mini.primary,
  button.primary,
  a.primary,
  .quick button.primary,
  .task-actions .btn.primary,
  .reprogram-form .btn.primary,
  .react-actions .btn.primary,
  .overdue-alert .btn
){
  background:#006d77!important;
  background-color:#006d77!important;
  background-image:none!important;
  border-color:#006d77!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  text-shadow:none!important;
  box-shadow:none!important;
}
html[data-adko-theme="light"] body :is(
  .scope-tabs a.active,
  .tabs .btn.active,
  .tab.active,
  .dates .btn.primary,
  .btn.primary,
  button.btn.primary,
  a.btn.primary,
  .mini.primary,
  button.primary,
  a.primary,
  .quick button.primary,
  .task-actions .btn.primary,
  .reprogram-form .btn.primary,
  .react-actions .btn.primary,
  .overdue-alert .btn
) :is(span,strong,b,small,i,em){
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}

/* Google Calendar dentro de Pizarra: acción manual siempre petróleo + blanco. */
html[data-adko-theme="light"] body form[action*="google_calendar"] :is(button,.btn),
html[data-adko-theme="light"] body :is(
  a.btn.primary[href*="google_calendar"],
  a[href*="google_calendar_connect.php"].primary,
  button[data-google-action],
  .google-action.primary,
  .calendar-action.primary
){
  background:#006d77!important;
  background-color:#006d77!important;
  background-image:none!important;
  border-color:#006d77!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  text-shadow:none!important;
}

/* Enlaces de conexión no rellenos conservan petróleo legible, no ámbar. */
html[data-adko-theme="light"] body :is(
  .who a[href*="google_calendar"],
  .calendar-status a[href*="google_calendar"],
  a[href*="google_calendar.php"]:not(.btn):not(.primary)
){
  color:#006d77!important;
  -webkit-text-fill-color:#006d77!important;
  text-decoration-color:rgba(0,109,119,.35)!important;
}

/* Refuerzo puntual del selector HOY y pestañas activas de Equipo Hoy. */
html[data-adko-theme="light"] body .toolbar .dates .btn.primary,
html[data-adko-theme="light"] body .toolbar .tabs .btn.active,
html[data-adko-theme="light"] body .scope-tabs a.active{
  background:#006d77!important;
  border-color:#006d77!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}

/* No tocar semántica: éxito/error/advertencia/cancelado conservan su lenguaje visual. */
html[data-adko-theme="light"] body :is(.btn.green,.mini.green,.good,.status-done){-webkit-text-fill-color:initial}
html[data-adko-theme="light"] body :is(.btn.red,.mini.red,.danger,.status-miss){-webkit-text-fill-color:initial}
