/* Intelix White · capa visual común de las pantallas operativas del CRM.
   Se carga después del CSS específico de cada página y solo actúa cuando
   data-tema="white" está activo. Los documentos imprimibles quedan fuera. */
:root[data-tema="white"] {
  color-scheme: light;
  --ix-white-bg: #f8fafc;
  --ix-white-card: rgba(255, 255, 255, 0.94);
  --ix-white-card-soft: #f3f6fb;
  --ix-white-line: #d6deec;
  --ix-white-ink: #211938;
  --ix-white-muted: #675f78;
  --ix-white-primary: #5b4df6;
  --ix-white-primary-dark: #4938db;
  --ix-white-success: #0f9f6e;
  --ix-white-warning: #b86b00;
  --ix-white-danger: #c6293e;
  --ix-white-shadow: 0 12px 34px rgba(53, 43, 92, 0.08);
  --ix-white-radius: 18px;
}

:root[data-tema="white"] body.ix-crm-screen {
  color: var(--ix-white-ink);
  background-color: var(--ix-white-bg);
  background-image:
    radial-gradient(circle at 84% 0%, rgba(91, 77, 246, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  background-attachment: fixed;
}

/* Las páginas auxiliares antiguas tenían cabeceras moradas a página completa.
   En White pasan a la misma tarjeta superior clara que Auditorías Dahua. */
:root[data-tema="white"] body.ix-crm-screen > header:not(.topbar):not(.top):not(.nav-header) {
  width: min(1760px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 14px 20px;
  color: var(--ix-white-ink);
  background: var(--ix-white-card);
  border: 1px solid var(--ix-white-line);
  border-radius: var(--ix-white-radius);
  box-shadow: var(--ix-white-shadow);
}

:root[data-tema="white"] body.ix-crm-screen > header:not(.topbar):not(.top):not(.nav-header) p,
:root[data-tema="white"] body.ix-crm-screen > header:not(.topbar):not(.top):not(.nav-header) .meta {
  color: var(--ix-white-muted);
  opacity: 1;
}

:root[data-tema="white"] body.ix-crm-screen > header:not(.topbar):not(.top):not(.nav-header) a {
  color: var(--ix-white-ink);
  background: #fff;
  border: 1px solid var(--ix-white-line);
  box-shadow: none;
}

:root[data-tema="white"] body.ix-crm-screen > header:not(.topbar):not(.top):not(.nav-header) a:hover {
  color: var(--ix-white-primary-dark);
  border-color: rgba(91, 77, 246, 0.45);
  background: #f5f3ff;
}

:root[data-tema="white"] body.ix-crm-screen :is(input, select, textarea, button, a):focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

:root[data-tema="white"] body.ix-crm-screen :is(input, select, textarea) {
  color-scheme: light;
}

@media (max-width: 720px) {
  :root[data-tema="white"] body.ix-crm-screen > header:not(.topbar):not(.top):not(.nav-header) {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 13px 14px;
  }
}

@media print {
  body.ix-crm-screen { background: #fff !important; }
}
