/* Theme controls and user permissions work in both color schemes. */
.ces-theme-control{display:grid;gap:7px;padding:10px 9px 14px;margin-bottom:5px;border-bottom:1px solid var(--ces-line,#dce6ed);font-size:12px}.ces-theme-control select{min-height:38px;padding:7px 9px;font-size:13px}.ces-login-theme{position:absolute;right:30px;top:24px;display:flex;align-items:center;gap:10px;font-size:12px;color:#61788a}.ces-login-theme select{width:125px;min-height:38px;padding:7px 10px;font:inherit;border:1px solid #d8e3eb;border-radius:8px;color:#28485e;background:#fff}.ces-login-main{position:relative}.ces-permissions{grid-column:1/-1;min-width:0;margin:8px 0 0;padding:18px;border:1px solid var(--ces-line);border-radius:10px}.ces-permissions legend{font-size:15px;font-weight:700;padding:0 7px}.ces-permissions p{font-size:12px;color:var(--ces-muted);margin:0 0 15px}.ces-permissions small{display:block;line-height:1.6;margin-top:14px}.ces-permission-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ces-permission-options label{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--ces-line);border-radius:8px;font-size:13px;cursor:pointer}.ces-permission-options input{flex:0 0 17px;margin:0}.ces-permission-options label:has(input:checked){background:#edf4fb;border-color:#a8c9e5}.ces-permission-options input:disabled{cursor:not-allowed;opacity:.65}#menu_principal .ces-mobile-nav{grid-template-columns:repeat(auto-fit,minmax(60px,1fr))}@media(max-width:600px){.ces-login-theme{right:20px;top:15px}.ces-login-main{padding-top:82px}.ces-permissions{padding:14px}.ces-permission-options{grid-template-columns:1fr}.ces-permission-options label{min-height:46px}}

/* Explicit overrides keep old module colors consistent with the shared palette. */
html[data-theme=dark]{color-scheme:dark;--ces-ink:#e0e9f2;--ces-muted:#a7b9ca;--ces-primary:#79b9ec;--ces-primary-dark:#5fa7de;--ces-navy:#d9e9f4;--ces-line:#304356;--ces-bg:#101b29;--ces-shadow:0 12px 40px #00000012;--tom0:#1a293a;--tom1:#d9e9f4;--tom1b:#00000088;--tom1c:#24384b;--tom2:#79b9ec;--tom3:#6ab7db;--tom4:#30536a;background:#101b29;color:#e0e9f2}
html[data-theme=dark] body{background:var(--ces-bg);color:var(--ces-ink)}
html[data-theme=dark] :is(.ces-sidebar,.ces-topbar,.ces-mobile-nav,.user_info_top>.menu,table,.form>.container,.add_edit_agenda>.container,.ces-password-form>form,.ces-access-state,.ces-stat,.estrutura-calendario,.cal-header,.ces-weekdays,.cal-dia,.ces-empty-search){background:#1a293a;border-color:var(--ces-line);color:var(--ces-ink)}
html[data-theme=dark] :is(button,input,select,textarea){background:#1e3043;color:var(--ces-ink);border-color:#3b5065}
html[data-theme=dark] :is(input,select,textarea):disabled{background:#172535;color:#9fb2c4}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#93a8bb}
html[data-theme=dark] :is(h1,h2,h3,.listagem>h2,.agendas_do_dia>h1,.cal-mes-ano,.ces-stat strong,.ces-user-copy strong,.ces-current-page,td.nome,td.cliente,label,.form .item>label,.add_edit_agenda .it>label,.sub_it>label){color:#e0e9f2}
html[data-theme=dark] :is(small,.ces-nav-group,.ces-brand small,.ces-user-copy small,.ces-side-footer small,.ces-breadcrumb,.ces-nav-item,.ces-mobile-nav button,thead th,td.cod,td.adicao,.ces-card-table td:before,.ces-more-events,.ces-weekdays span,.ces-stat small){color:#a7b9ca}
html[data-theme=dark] :is(.ces-nav-item,.ces-user-trigger,.user_info_top>.menu button,.ces-mobile-nav button){background:transparent}
html[data-theme=dark] :is(button:hover,.ces-nav-item:hover,.user_info_top>.menu button:hover){background:#284055;border-color:#4b657d}
html[data-theme=dark] :is(.ces-nav-item.is-active,.ces-mobile-nav button.is-active){background:#1a3650;color:#a4d1f5}
html[data-theme=dark] .ces-brand img{background:#fff;border-radius:50%;padding:2px}
html[data-theme=dark] :is(.ces-avatar,.floating_menu,.ces-sidebar-close,.ces-modal-close){background:#2a4255;color:#b9d9e6}
html[data-theme=dark] .ces-user-trigger:hover{background:transparent}
html[data-theme=dark] :is(.buttons .cancelar,.buttons .fechar,.ces-password-form .cancel){background:#263d51;color:#d9e7f2;border-color:#456078}
html[data-theme=dark] .ces-login-card button{background:#245f8d;color:#fff;border-color:#3b7db4}
html[data-theme=dark] :is(thead th,.ces-card-table tbody tr,.cal-dia.vazio){background:#162536;border-color:#304356}
html[data-theme=dark] :is(tbody td,tfoot td,.ces-card-table td.acoes){border-color:#304356}
html[data-theme=dark] tbody tr:hover td{background:#203449}
html[data-theme=dark] :is(.acao,.form .cl button){background:#243f51;border-color:#365b70;color:#a8d3f3}
html[data-theme=dark] :is(.form>.container>b,.add_edit_agenda>.container>h1,.ces-password-form>form>h2,.form .buttons,.add_edit_agenda .buttons,.ces-password-form .buttons){background:#1a293a;border-color:#304356;color:#e0e9f2}
html[data-theme=dark] :is(.buttons .salvar,.ces-password-form button[type=submit],.listagem>.buttons>button,.agendas_do_dia>.list>.adicionar){background:#245f8d;color:#fff;border-color:#3b7db4}
html[data-theme=dark] :is(.buttons .salvar:hover,.listagem>.buttons>button:hover){background:#2d74aa}
html[data-theme=dark] :is(.buttons .excluir,.buttons .apagar){background:#492d37;color:#ffc0b9;border-color:#74444e}
html[data-theme=dark] :is(.ces-role-pill,.ces-permission-options label:has(input:checked),.add_edit_agenda .escopo_agenda,.ces-total-row td,.ces-card-table tr.ces-total-row td){background:#1b3550;color:#b4d8f5;border-color:#385d80}
html[data-theme=dark] .ces-permission-options label{color:#e0e9f2}
html[data-theme=dark] .ces-summary-table .ces-price-highlight td{background:#203f5f;color:#c0e0fa}
html[data-theme=dark] .servico_it{background:#162536;border-color:#304356}
html[data-theme=dark] .item.servicos>button{background:#203e59;border-color:#385e7e;color:#bddcf4}
html[data-theme=dark] .item.valor{background:#1b3550;border-color:#385d80}
html[data-theme=dark] .item.valor input{background:transparent;color:#c0e0fa}
html[data-theme=dark] #custos_calculo td button{background:#203e59;border-color:#385e7e;color:#bddcf4}
html[data-theme=dark] .orcamento_gerado_view{background:#101b29}
html[data-theme=dark] .orcamento_gerado_view>.buttons{background:#1a293a;border-color:#304356}
html[data-theme=dark] .cal-dias{background:#304356;border-color:#304356}
html[data-theme=dark] .cal-dia.hoje{background:#213b54}
html[data-theme=dark] .cal-dia.hoje .ces-day-number{background:#245f8d;color:#fff}
html[data-theme=dark] .cal-dia:hover{background:#294e6d}
html[data-theme=dark] .agendas_de_hoje .it{background:#28475c;color:#c3e1f2;border-color:#6ba7c5}
html[data-theme=dark] .agendas_de_hoje .it[data-status="1"]{background:#4d4029;color:#ffe2a0;border-color:#c1a04f}
html[data-theme=dark] :is(.agendas_de_hoje .it[data-status="4"],.agendas_de_hoje .it[data-status="5"]){background:#234b3e;color:#b1e5c9;border-color:#62ad85}
html[data-theme=dark] .agendas_de_hoje .it[data-status="6"]{background:#4b303a;color:#f8c0b7;border-color:#b57775}
html[data-theme=dark] :is(#spaceConfirm .cont,#spacePrompt .cont){background:#1a293a!important;color:#e0e9f2!important;border:1px solid #3b5065}
html[data-theme=dark] :is(#spaceConfirm .cont span,#spacePrompt .cont span){color:#e0e9f2!important}
html[data-theme=dark] a{color:#8bc4f0}
html[data-theme=dark] .ces-login-main{background:#101b29;color:#e0e9f2}
html[data-theme=dark] :is(.ces-login-card h2,.ces-login-card label,.ces-login-mobile-brand strong){color:#e0e9f2}
html[data-theme=dark] :is(.ces-login-card>p,.ces-login-footer,.ces-login-theme){color:#a7b9ca}
html[data-theme=dark] :is(.ces-login-card input,.ces-login-theme select){background:#1a293a;border-color:#40566b;color:#e0e9f2}
html[data-theme=dark] .ces-login-mobile-brand img{background:#fff;border-radius:50%;padding:2px}
@media(max-width:600px){html[data-theme=dark] .agendas_de_hoje .it{background:#88c3dc}html[data-theme=dark] .agendas_de_hoje .it[data-status="1"]{background:#e2be73}html[data-theme=dark] :is(.agendas_de_hoje .it[data-status="4"],.agendas_de_hoje .it[data-status="5"]){background:#78c39b}html[data-theme=dark] .agendas_de_hoje .it[data-status="6"]{background:#db9e95}}

/* Prevent small focus targets on phones and touch devices from triggering input zoom. */
@media (max-width:860px), (pointer:coarse) {
  input, select, textarea,
  .ces-login-card input,
  .ces-search input,
  .ces-theme-control select,
  .ces-login-theme select { font-size:16px; }
}
