/* =========================================================
   ZIVA ERP - Tema Claro Suave
   Modo claro menos branco, com superfícies cinza-azuladas.
   Escopo: somente theme-light. Não altera o modo escuro.
   ========================================================= */
html.theme-light,
body.theme-light,
html[data-theme="light"],
body[data-theme="light"]{
  --z5-bg:#c9d3df;
  --z5-bg-2:#d6dee8;
  --z5-surface:#dce4ed;
  --z5-surface-2:#d2dce7;
  --z5-card:#e2e8ef;
  --z5-text:#172033;
  --z5-title:#111827;
  --z5-muted:#526176;
  --z5-border:#aebdcd;
  --z5-topbar:rgba(218,226,235,.96);
  --ziva6-bg:#c9d3df;
  --ziva6-card:#e2e8ef;
  --ziva6-card-2:#d7e0e9;
  --ziva6-line:rgba(71,101,136,.28);
  --ziva6-text:#172033;
  --ziva6-muted:#526176;
}

html.theme-light body:not(.login-body),
body.theme-light:not(.login-body),
html[data-theme="light"] body:not(.login-body){
  background:linear-gradient(135deg,#c7d1dd 0%,#d7dfe8 52%,#cbd6e2 100%)!important;
  color:#172033!important;
}
html.theme-light .app,
body.theme-light .app{
  background:linear-gradient(135deg,#c7d1dd 0%,#d7dfe8 52%,#cbd6e2 100%)!important;
}
html.theme-light .main,
body.theme-light .main,
html.theme-light .content,
body.theme-light .content,
html.theme-light .page-content,
body.theme-light .page-content{
  color:#172033!important;
}
html.theme-light .topbar,
body.theme-light .topbar,
html.theme-light header.topbar,
body.theme-light header.topbar{
  background:rgba(216,224,234,.96)!important;
  border-color:#aebdcd!important;
  box-shadow:0 8px 28px rgba(30,41,59,.10)!important;
}

/* Cards e painéis: claros, mas sem branco puro */
html.theme-light .card,
body.theme-light .card,
html.theme-light .diag-card,
body.theme-light .diag-card,
html.theme-light .noc-card,
body.theme-light .noc-card,
html.theme-light .noc-panel,
body.theme-light .noc-panel,
html.theme-light .chatv3-card,
body.theme-light .chatv3-card,
html.theme-light .panel,
body.theme-light .panel,
html.theme-light .view-field,
body.theme-light .view-field,
html.theme-light .table-wrap,
body.theme-light .table-wrap,
html.theme-light .modal-content,
body.theme-light .modal-content,
html.theme-light .dropdown-menu,
body.theme-light .dropdown-menu{
  background:linear-gradient(180deg,#e4e9ef 0%,#d9e1e9 100%)!important;
  color:#172033!important;
  border-color:#aebdcd!important;
  box-shadow:0 14px 38px rgba(30,41,59,.11)!important;
}

html.theme-light h1,
html.theme-light h2,
html.theme-light h3,
html.theme-light h4,
html.theme-light h5,
html.theme-light h6,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light h5,
body.theme-light h6,
html.theme-light .card h1,
html.theme-light .card h2,
html.theme-light .card h3,
body.theme-light .card h1,
body.theme-light .card h2,
body.theme-light .card h3{
  color:#111827!important;
}
html.theme-light p,
body.theme-light p,
html.theme-light .muted,
body.theme-light .muted,
html.theme-light small,
body.theme-light small,
html.theme-light .help-text,
body.theme-light .help-text{
  color:#526176!important;
}

/* Tabelas */
html.theme-light .table-wrap,
body.theme-light .table-wrap{
  background:#dce4ed!important;
}
html.theme-light .table,
body.theme-light .table,
html.theme-light table,
body.theme-light table{
  background:transparent!important;
  color:#172033!important;
}
html.theme-light .table th,
body.theme-light .table th,
html.theme-light table th,
body.theme-light table th{
  background:#cbd7e4!important;
  color:#25344a!important;
  border-color:#adbdcd!important;
}
html.theme-light .table td,
body.theme-light .table td,
html.theme-light table td,
body.theme-light table td{
  color:#172033!important;
  border-color:#b8c5d2!important;
}
html.theme-light .table tr:hover td,
body.theme-light .table tr:hover td,
html.theme-light table tr:hover td,
body.theme-light table tr:hover td{
  background:#d2dce7!important;
}

/* Campos */
html.theme-light .form-control,
body.theme-light .form-control,
html.theme-light select,
body.theme-light select,
html.theme-light textarea,
body.theme-light textarea,
html.theme-light input[type="text"],
body.theme-light input[type="text"],
html.theme-light input[type="email"],
body.theme-light input[type="email"],
html.theme-light input[type="password"],
body.theme-light input[type="password"],
html.theme-light input[type="number"],
body.theme-light input[type="number"],
html.theme-light input[type="search"],
body.theme-light input[type="search"],
html.theme-light input[type="date"],
body.theme-light input[type="date"]{
  background:#cfd9e4!important;
  color:#172033!important;
  border-color:#9fb0c3!important;
}
html.theme-light input::placeholder,
body.theme-light input::placeholder,
html.theme-light textarea::placeholder,
body.theme-light textarea::placeholder{
  color:#6b7b8f!important;
  opacity:1!important;
}
html.theme-light .form-control:focus,
body.theme-light .form-control:focus,
html.theme-light input:focus,
body.theme-light input:focus,
html.theme-light select:focus,
body.theme-light select:focus,
html.theme-light textarea:focus,
body.theme-light textarea:focus{
  background:#d8e1eb!important;
  border-color:#4f86d9!important;
  box-shadow:0 0 0 4px rgba(59,130,246,.13)!important;
}

/* Botões neutros / seletores do tema */
html.theme-light .ziva5-theme-trigger,
body.theme-light .ziva5-theme-trigger,
html.theme-light .theme-toggle,
body.theme-light .theme-toggle,
html.theme-light .btn.secondary,
body.theme-light .btn.secondary,
html.theme-light .btn.btn-secondary,
body.theme-light .btn.btn-secondary{
  background:#d2dce7!important;
  color:#172033!important;
  border-color:#9fb0c3!important;
}

/* Modais já existentes no modo claro */
html.theme-light .ziva-session-modal,
body.theme-light .ziva-session-modal,
html.theme-light .ziva-first-modal,
body.theme-light .ziva-first-modal,
html.theme-light .cliente-location-box,
body.theme-light .cliente-location-box{
  background:#dce4ed!important;
  color:#172033!important;
  border-color:#aebdcd!important;
}
html.theme-light .ziva-session-item,
body.theme-light .ziva-session-item,
html.theme-light .ziva-first-user,
body.theme-light .ziva-first-user,
html.theme-light .cliente-location-address,
body.theme-light .cliente-location-address,
html.theme-light .cliente-location-map,
body.theme-light .cliente-location-map{
  background:#cfd9e4!important;
  border-color:#aebdcd!important;
}
html.theme-light .ziva-session-password input,
body.theme-light .ziva-session-password input,
html.theme-light .ziva-first-field input,
body.theme-light .ziva-first-field input{
  background:#cfd9e4!important;
  color:#172033!important;
  border-color:#9fb0c3!important;
}

/* Login administrativo + funcionário + cliente */
html.theme-light body,
body.theme-light{
  background:#c8d3df!important;
}
html.theme-light .ziva-login,
body.theme-light .ziva-login,
html.theme-light .login-side,
body.theme-light .login-side,
html.theme-light .portal-login,
body.theme-light .portal-login,
html.theme-light .ziva-portal-login,
body.theme-light .ziva-portal-login,
html.theme-light .intcom-portal-login,
body.theme-light .intcom-portal-login{
  background:radial-gradient(circle at 45% 72%,rgba(37,99,235,.12),transparent 34%),linear-gradient(135deg,#c4cfdb 0%,#d3dce6 52%,#c7d2de 100%)!important;
}
html.theme-light .login-card,
body.theme-light .login-card,
html.theme-light .portal-card,
body.theme-light .portal-card,
html.theme-light .auth-card,
body.theme-light .auth-card{
  background:linear-gradient(180deg,#dfe6ee 0%,#d5dee8 100%)!important;
  border-color:#9fb1c5!important;
  box-shadow:0 20px 55px rgba(30,41,59,.16)!important;
}
html.theme-light .login-card .form-control,
body.theme-light .login-card .form-control,
html.theme-light .portal-card input,
body.theme-light .portal-card input,
html.theme-light .auth-card input,
body.theme-light .auth-card input{
  background:#cbd6e2!important;
  border-color:#98abc0!important;
  color:#172033!important;
}
html.theme-light .floating-theme,
body.theme-light .floating-theme,
html.theme-light #loginThemeToggle,
body.theme-light #loginThemeToggle{
  background:#d5dee8!important;
  color:#172033!important;
  border-color:#9fb1c5!important;
}
html.theme-light .login-art,
body.theme-light .login-art,
html.theme-light .portal-art,
body.theme-light .portal-art{
  background:linear-gradient(135deg,#becbd8 0%,#d1dae4 50%,#c3cfdb 100%)!important;
}
html.theme-light .art-card,
body.theme-light .art-card,
html.theme-light .portal-art .art-card,
body.theme-light .portal-art .art-card{
  background:linear-gradient(135deg,rgba(220,228,237,.96),rgba(207,218,230,.94))!important;
  border-color:#9fb1c5!important;
}

/* Mantém a barra lateral escura também no modo claro */
html.theme-light .sidebar,
body.theme-light .sidebar,
html.theme-light aside.sidebar,
body.theme-light aside.sidebar{
  background:#050b16!important;
  background-image:linear-gradient(180deg,#050b16 0%,#071426 55%,#08101f 100%)!important;
}
