/* Cristal claro: tipografía técnica condensada y planos de vidrio sobre un fondo agua. */
body[data-theme="crystal"] {
  --ins-accent: #147f86;
  --ins-dark: #f5fbfb;
  --ins-surface: transparent;
  --ins-green: #18a999;
  --ins-amber: #f2a541;
  --chart-blue: #4f6bed;
  --chart-teal: #18a999;
  --chart-amber: #f2a541;
  --chart-slate: #8367d8;
  --chart-aqua: #19b9c4;
  --chart-rose: #e46b7a;
  color: #243942;
  color-scheme: light;
  background: #eaf1f3;
  font-family: "Arial Narrow", "Aptos Narrow", "Segoe UI", Arial, sans-serif;
  font-stretch: normal;
  -webkit-font-smoothing: antialiased;
}
body[data-theme="crystal"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(72, 183, 177, .39), transparent 40%),
    radial-gradient(ellipse at 88% 18%, rgba(105, 165, 202, .33), transparent 40%),
    radial-gradient(ellipse at 68% 94%, rgba(227, 184, 123, .32), transparent 38%),
    radial-gradient(ellipse at 48% 55%, rgba(140, 143, 190, .10), transparent 42%),
    linear-gradient(138deg, #e5eff0 0%, #dfeaec 52%, #f1efea 100%);
}
body[data-theme="crystal"] header {
  color: #243942;
  background: rgba(250, 253, 253, .64);
  border-bottom: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 5px 22px rgba(37, 67, 76, .08);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
body[data-theme="crystal"] .product-name { color: #223b46; border-color: rgba(49,91,102,.18); }
body[data-theme="crystal"] .product-name small { color: #58717a; }
body[data-theme="crystal"] .account strong { color: #243942; }
body[data-theme="crystal"] .account small { color: #667d84; }
body[data-theme="crystal"] header .header-button {
  color: #34545d;
  background: rgba(255,255,255,.55);
  border-color: rgba(55,105,114,.24);
}
body[data-theme="crystal"] header .header-button:hover { background: rgba(255,255,255,.86); border-color: rgba(20,127,134,.42); }
body[data-theme="crystal"] .demo-banner {
  color: #38535b;
  background: rgba(248, 252, 252, .46);
  border-bottom: 1px solid rgba(255,255,255,.78);
  box-shadow: inset 3px 0 #188c91;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
body[data-theme="crystal"] .demo-banner strong { color: #176f75; letter-spacing: .045em; }
body[data-theme="crystal"] .demo-palette > span { color: #607981; }
body[data-theme="crystal"] .demo-banner { font-size: 12px; }
body[data-theme="crystal"] .demo-palette button { font-size: 11px; }
body[data-theme="crystal"] .demo-palette button {
  color: #405c64;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(65,112,121,.19);
  box-shadow: inset 0 1px rgba(255,255,255,.72);
}
body[data-theme="crystal"] .demo-palette button:hover { background: rgba(255,255,255,.85); border-color: rgba(20,127,134,.35); }
body[data-theme="crystal"] .demo-palette button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, #247f84, #166d75);
  border-color: #247f84;
  box-shadow: 0 3px 12px rgba(27,111,117,.18);
}
body[data-theme="crystal"] .workspace { background: transparent; }
body[data-theme="crystal"] .sidebar {
  color: #40565e;
  background: rgba(247, 251, 251, .43);
  border-color: rgba(255,255,255,.84);
  box-shadow: inset -1px 0 rgba(75,115,124,.08);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}
body[data-theme="crystal"] .panel-caption { color: #6d8289; }
body[data-theme="crystal"] .sidebar > button { color: #415a63; background: transparent; }
body[data-theme="crystal"] .sidebar > button:hover { color: #1f454d; background: rgba(255,255,255,.58); }
body[data-theme="crystal"] .sidebar > button.selected {
  color: #176f75;
  background: linear-gradient(90deg, rgba(44,145,148,.14), rgba(255,255,255,.39));
  box-shadow: inset 2px 0 #21858a, inset 0 0 0 1px rgba(37,132,137,.13);
}
body[data-theme="crystal"] .demo-sidebar-label { color: #758a90; }
body[data-theme="crystal"] .sidebar .demo-role { color: #657b81; border-color: rgba(55,102,112,.16); }
body[data-theme="crystal"] .sidebar .demo-role b { color: #304a52; }
body[data-theme="crystal"] .sidebar .demo-change-role { color: #34545d; background: rgba(255,255,255,.58); border-color: rgba(55,105,114,.2); }
body[data-theme="crystal"] .demo-nav-icon { color: #58777e; }
body[data-theme="crystal"] .sidebar > button.selected .demo-nav-icon { color: #187d82; }
body[data-theme="crystal"] .sidebar > small { color: #71858a; }
body[data-theme="crystal"] #main { color: #2d444c; background: transparent; }
body[data-theme="crystal"] .demo-title small { color: #287d80; }
body[data-theme="crystal"] .demo-title small { font-size: 11px; }
body[data-theme="crystal"] .demo-title h2 { color: #243b44; font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
body[data-theme="crystal"] .demo-title p { color: #5c737b; font-size: 14px; }
body[data-theme="crystal"] .demo-foot { color: #72868b; }
body[data-theme="crystal"] .ins-view .card,
body[data-theme="crystal"] .view > .card {
  color: #2d444c;
  background: rgba(250, 253, 253, .46);
  border: 1px solid rgba(255,255,255,.91);
  box-shadow: 0 9px 28px rgba(45, 79, 88, .09), inset 0 1px rgba(255,255,255,.85);
  backdrop-filter: blur(18px) saturate(142%);
  -webkit-backdrop-filter: blur(18px) saturate(142%);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
body[data-theme="crystal"] .ins-view .card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.98);
  box-shadow: 0 12px 30px rgba(45,79,88,.11), inset 0 1px rgba(255,255,255,.92);
}
body[data-theme="crystal"] .ins-view h1,
body[data-theme="crystal"] .ins-view h2,
body[data-theme="crystal"] .ins-view h3,
body[data-theme="crystal"] .ins-view h4 { color: #2a4149; }
body[data-theme="crystal"] .ins-view p,
body[data-theme="crystal"] .ins-view label,
body[data-theme="crystal"] .ins-view .ins-status { color: #566d74; }
body[data-theme="crystal"] .ins-view small,
body[data-theme="crystal"] .ins-view .ins-card-title small { color: #657b82; }
body[data-theme="crystal"] .ins-card-title h2 { color: #2a4149; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
body[data-theme="crystal"] .ins-card-title small { font-size: 11px; line-height: 1.55; }
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts .ins-card-title h2 { font-size: 13px; }
body[data-theme="crystal"] .ins-kpis article,
body[data-theme="crystal"] .ins-ratios article {
  background: rgba(255,255,255,.43);
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 5px 16px rgba(44,79,88,.06), inset 0 1px rgba(255,255,255,.8);
}
body[data-theme="crystal"] .ins-kpis article strong,
body[data-theme="crystal"] .ins-ratios strong { color: #263f48; }
body[data-theme="crystal"] .ins-kpis article small,
body[data-theme="crystal"] .ins-kpis article span,
body[data-theme="crystal"] .ins-ratios small,
body[data-theme="crystal"] .ins-ratios span:not(.ins-ratio-mark) { color: #61767d; }
body[data-theme="crystal"] .ins-kpis article:nth-child(1) { border-top-color: #4f6bed; }
body[data-theme="crystal"] .ins-kpis article:nth-child(2) { border-top-color: #18a999; }
body[data-theme="crystal"] .ins-kpis article:nth-child(3) { border-top-color: #8367d8; }
body[data-theme="crystal"] .ins-kpis article:nth-child(4) { border-top-color: #f2a541; }
body[data-theme="crystal"] .ins-ratios .ins-ratio-selected { background: rgba(248,252,250,.72); border-color: rgba(34,135,136,.34); }
body[data-theme="crystal"] .ins-ratio-mark { background: rgba(38,145,160,.1); color: #277985; }
body[data-theme="crystal"] .ins-ratios article:nth-child(2) .ins-ratio-mark { background: rgba(49,152,118,.11); color: #26795f; }
body[data-theme="crystal"] .ins-ratios article:nth-child(3) .ins-ratio-mark { background: rgba(130,111,192,.11); color: #705ca9; }
body[data-theme="crystal"] .ins-ratios article:nth-child(4) .ins-ratio-mark { background: rgba(189,129,58,.12); color: #97611f; }
body[data-theme="crystal"] .ins-ratios small { font-size: 12px; letter-spacing: .01em; }
body[data-theme="crystal"] .ins-ratios article span:not(.ins-ratio-mark) { font-size: 11px; }
body[data-theme="crystal"] .ins-ratios article { gap: 13px; padding: 16px; }
body[data-theme="crystal"] .ins-ratio-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 0; }
body[data-theme="crystal"] .ins-ratio-mark svg,
body[data-theme="crystal"] .demo-nav-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-theme="crystal"] .demo-nav-icon { width: 20px; }
body[data-theme="crystal"] .ins-ratio-mark svg { width: 16px; height: 16px; }
body[data-theme="crystal"] .ins-ratios strong { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
body[data-theme="crystal"] .ins-ratios .ins-ratio-selected .ins-ratio-mark { color: #986526; background: rgba(205,147,75,.14); }
body[data-theme="crystal"] .ins-empty { color: #63777d; background: rgba(255,255,255,.43); border-color: rgba(77,122,130,.2); }
body[data-theme="crystal"] .ins-bars span { color: #536a72; }
body[data-theme="crystal"] .ins-bars strong { color: #304b54; }
body[data-theme="crystal"] .ins-bar-track,
body[data-theme="crystal"] .ins-meter { background: rgba(83,120,128,.14); }
body[data-theme="crystal"] .ins-bar-track i { background: linear-gradient(90deg, #4f6bed, #19b9c4); }
body[data-theme="crystal"] .ins-ring-base { stroke: rgba(76,114,123,.14); }
body[data-theme="crystal"] .ins-ring-number { fill: #263f48; }
body[data-theme="crystal"] .ins-ring-caption,
body[data-theme="crystal"] .ins-axis { fill: #71858b; }
body[data-theme="crystal"] .ins-value-label { fill: #365b65; }
body[data-theme="crystal"] .ins-gridline { stroke: rgba(68,106,115,.15); }
body[data-theme="crystal"] .ins-ring-legend button { color: #50676f; font-size: 11px; }
body[data-theme="crystal"] .ins-ring-legend button:hover { color: #263f48; background: rgba(255,255,255,.56); }
body[data-theme="crystal"] .ins-ring-legend strong { color: #304d56; }
body[data-theme="crystal"] .ins-chart-hint { color: #667c82 !important; font-size: 11px !important; }
body[data-theme="crystal"] .ins-column { opacity: .87; }
body[data-theme="crystal"] .ins-multi-series .ins-point-dot { fill: #f8fcfc; }
body[data-theme="crystal"] .ins-multi-legend span { color: #566e75; background: rgba(255,255,255,.42); border-color: rgba(255,255,255,.72); }
body[data-theme="crystal"] .ins-unit-bars,
body[data-theme="crystal"] .ins-performance-note { background: rgba(255,255,255,.48); border-color: rgba(255,255,255,.8); }
body[data-theme="crystal"] .ins-unit-bars h4,
body[data-theme="crystal"] .ins-unit-lines h4,
body[data-theme="crystal"] .ins-production-machine-grid > section > h3,
body[data-theme="crystal"] .ins-production-time > h3 { color: #566f76; }
body[data-theme="crystal"] .ins-performance-note p,
body[data-theme="crystal"] .ins-performance-meta { color: #61777e; }
body[data-theme="crystal"] .ins-performance-note strong,
body[data-theme="crystal"] .ins-performance-meta strong { color: #304b53; }
body[data-theme="crystal"] .ins-performance-index { color: #287d80; background: rgba(42,143,145,.1); }
body[data-theme="crystal"] .ins-view th { color: #405c64; background: rgba(224,239,239,.72); border-color: rgba(82,126,134,.18); }
body[data-theme="crystal"] .ins-view td { color: #405961; border-color: rgba(82,126,134,.14); }
body[data-theme="crystal"] .ins-view td strong { color: #2e4850; }
body[data-theme="crystal"] .ins-view td small { color: #667c82; }
body[data-theme="crystal"] .ins-view tbody tr:hover { background: rgba(255,255,255,.5); }
body[data-theme="crystal"] .ins-note { color: #496169; background: rgba(223,243,239,.67); border-color: #389b95; }
body[data-theme="crystal"] .ins-performance-card { border-color: rgba(255,255,255,.85) !important; }
body[data-theme="crystal"] input,
body[data-theme="crystal"] select,
body[data-theme="crystal"] textarea,
body[data-theme="crystal"] .ins-toolbar input,
body[data-theme="crystal"] .ins-toolbar select {
  color: #314b53;
  background: rgba(255,255,255,.63);
  border-color: rgba(69,113,121,.25);
  accent-color: #18858a;
}
body[data-theme="crystal"] input::placeholder,
body[data-theme="crystal"] textarea::placeholder { color: #829397; }
body[data-theme="crystal"] select option { color: #314b53; background: #f5f9f9; }
body[data-theme="crystal"] input:focus,
body[data-theme="crystal"] select:focus,
body[data-theme="crystal"] textarea:focus { outline-color: rgba(28,133,139,.18); border-color: #278d91; }
body[data-theme="crystal"] .ins-view button:not(.ins-ring-legend button),
body[data-theme="crystal"] .demo-change-role {
  color: #3e5a62;
  background: rgba(255,255,255,.56);
  border-color: rgba(69,113,121,.22);
}
body[data-theme="crystal"] .ins-view button:hover { background-color: rgba(255,255,255,.9); border-color: rgba(37,132,137,.4); }
body[data-theme="crystal"] .ins-view button.primary,
body[data-theme="crystal"] .ins-publish .primary,
body[data-theme="crystal"] .ins-toolbar .primary {
  color: #fff;
  background: linear-gradient(135deg, #247f84, #166d75);
  border-color: #247f84;
  box-shadow: 0 4px 12px rgba(27,111,117,.16);
}
body[data-theme="crystal"] .ins-view button.primary:hover { background: #176e75; }
body[data-theme="crystal"] .demo-message { color: #f7fbfb; background: rgba(31,82,87,.94); border: 1px solid rgba(255,255,255,.5); box-shadow: 0 12px 30px rgba(36,70,76,.19); backdrop-filter: blur(14px); }
body[data-theme="crystal"] .demo-title h2,
body[data-theme="crystal"] .ins-view,
body[data-theme="crystal"] .ins-view button,
body[data-theme="crystal"] .ins-view input,
body[data-theme="crystal"] .ins-view select,
body[data-theme="crystal"] .demo-banner,
body[data-theme="crystal"] .sidebar { font-family: inherit; }
body[data-theme="crystal"] .ins-toolbar label { font-size: 12px; }
body[data-theme="crystal"] .ins-toolbar input,
body[data-theme="crystal"] .ins-toolbar select { font-size: 13px; }
body[data-theme="crystal"] .ins-xy text,
body[data-theme="crystal"] .ins-ring text { font-family: "Arial Narrow", "Aptos Narrow", "Segoe UI", Arial, sans-serif !important; }
@media (max-width: 760px) {
  body[data-theme="crystal"] .sidebar { background: rgba(247,251,251,.62); }
  body[data-theme="crystal"] .demo-banner { padding-left: 14px; }
  body[data-theme="crystal"] .demo-palette { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="crystal"] .ins-view .card { transition: none; }
  body[data-theme="crystal"] .ins-view .card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  body[data-theme="crystal"] header,
  body[data-theme="crystal"] .demo-banner,
  body[data-theme="crystal"] .sidebar,
  body[data-theme="crystal"] .ins-view .card,
  body[data-theme="crystal"] .view > .card {
    background: #f5f9f9;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Modo oscuro opcional: conserva la misma composición de vidrio y la tipografía. */
body[data-theme="dark"] {
  --ins-accent: #55cfc2;
  --ins-dark: #0b1922;
  --ins-surface: transparent;
  --ins-green: #55c69a;
  --ins-amber: #e6ad63;
  --chart-blue: #57bada;
  --chart-teal: #55c69a;
  --chart-amber: #e6ad63;
  --chart-slate: #a492dc;
  --chart-aqua: #68d0d1;
  --chart-rose: #e68698;
  color: #e3edef;
  color-scheme: dark;
  background: #0d1921;
  font-family: "Arial Narrow", "Aptos Narrow", "Segoe UI", Arial, sans-serif;
}
body[data-theme="dark"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(35,137,133,.25), transparent 40%),
    radial-gradient(ellipse at 88% 18%, rgba(48,104,146,.24), transparent 40%),
    radial-gradient(ellipse at 68% 94%, rgba(145,103,52,.16), transparent 38%),
    linear-gradient(138deg, #0d1921 0%, #142832 52%, #18242a 100%);
}
body[data-theme="dark"] header {
  color: #edf5f5;
  background: rgba(8,19,27,.76);
  border-bottom: 1px solid rgba(208,238,238,.16);
  box-shadow: 0 5px 22px rgba(1,9,14,.22);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
body[data-theme="dark"] .product-name { color: #edf5f5; border-color: rgba(255,255,255,.18); }
body[data-theme="dark"] .product-name small,
body[data-theme="dark"] .account small { color: #a9bec4; }
body[data-theme="dark"] .account strong { color: #f2f7f7; }
body[data-theme="dark"] header .header-button { color: #dce9eb; background: rgba(255,255,255,.06); border-color: rgba(205,235,237,.2); }
body[data-theme="dark"] .demo-banner {
  color: #d7e5e7;
  background: rgba(17,36,44,.48);
  border-bottom: 1px solid rgba(205,231,234,.12);
  box-shadow: inset 3px 0 #55cfc2;
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}
body[data-theme="dark"] .demo-banner strong { color: #74d9cf; }
body[data-theme="dark"] .demo-palette > span { color: #adbec3; }
body[data-theme="dark"] .demo-palette button { color: #d7e5e7; background: rgba(255,255,255,.06); border-color: rgba(205,231,234,.17); }
body[data-theme="dark"] .demo-palette button:hover { background: rgba(255,255,255,.12); border-color: rgba(205,231,234,.3); }
body[data-theme="dark"] .demo-palette button[aria-pressed="true"] { color: #082124; background: linear-gradient(135deg,#69ded1,#3bb7ab); border-color: #65d8cc; }
body[data-theme="dark"] .workspace,
body[data-theme="dark"] #main { color: #d8e5e7; background: transparent; }
body[data-theme="dark"] .sidebar {
  color: #c5d5d9;
  background: rgba(9,23,31,.53);
  border-color: rgba(205,231,234,.12);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}
body[data-theme="dark"] .panel-caption,
body[data-theme="dark"] .demo-sidebar-label { color: #91a8af; }
body[data-theme="dark"] .sidebar > button { color: #c7d6d9; background: transparent; }
body[data-theme="dark"] .sidebar > button:hover { color: #f1f7f7; background: rgba(255,255,255,.065); }
body[data-theme="dark"] .sidebar > button.selected { color: #75d9ce; background: rgba(70,190,177,.12); box-shadow: inset 2px 0 #55cfc2, inset 0 0 0 1px rgba(85,207,194,.1); }
body[data-theme="dark"] .sidebar .demo-role { color: #9eb3ba; border-color: rgba(205,231,234,.14); }
body[data-theme="dark"] .sidebar .demo-role b { color: #e0ebed; }
body[data-theme="dark"] .sidebar .demo-change-role { color: #dce9eb; background: rgba(255,255,255,.06); border-color: rgba(205,231,234,.18); }
body[data-theme="dark"] .demo-nav-icon { color: #a2b7bd; }
body[data-theme="dark"] .sidebar > button.selected .demo-nav-icon { color: #75d9ce; }
body[data-theme="dark"] .sidebar > small,
body[data-theme="dark"] .demo-foot { color: #94aab0; }
body[data-theme="dark"] .demo-title small { color: #70d3c9; }
body[data-theme="dark"] .demo-title h2 { color: #eff6f6; }
body[data-theme="dark"] .demo-title p { color: #b4c6ca; }
body[data-theme="dark"] .ins-view .card,
body[data-theme="dark"] .view > .card {
  color: #dce8ea;
  background: rgba(22,41,51,.69);
  border: 1px solid rgba(210,237,239,.17);
  box-shadow: 0 9px 28px rgba(1,8,14,.2), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
body[data-theme="dark"] .ins-view .card:hover { border-color: rgba(210,237,239,.25); box-shadow: 0 12px 30px rgba(1,8,14,.25), inset 0 1px rgba(255,255,255,.07); }
body[data-theme="dark"] .ins-view h1,
body[data-theme="dark"] .ins-view h2,
body[data-theme="dark"] .ins-view h3,
body[data-theme="dark"] .ins-view h4,
body[data-theme="dark"] .ins-card-title h2 { color: #e8f1f2; }
body[data-theme="dark"] .ins-view p,
body[data-theme="dark"] .ins-view label,
body[data-theme="dark"] .ins-view .ins-status,
body[data-theme="dark"] .ins-card-title small { color: #afc2c7; }
body[data-theme="dark"] .ins-kpis article,
body[data-theme="dark"] .ins-ratios article { background: rgba(10,26,35,.48); border-color: rgba(210,237,239,.16); box-shadow: 0 5px 16px rgba(1,8,14,.12), inset 0 1px rgba(255,255,255,.045); }
body[data-theme="dark"] .ins-kpis article strong,
body[data-theme="dark"] .ins-ratios strong { color: #f0f6f6; }
body[data-theme="dark"] .ins-kpis article small,
body[data-theme="dark"] .ins-kpis article span,
body[data-theme="dark"] .ins-ratios small,
body[data-theme="dark"] .ins-ratios span:not(.ins-ratio-mark) { color: #a9bdc2; }
body[data-theme="dark"] .ins-kpis article:nth-child(1) { border-top-color: #57bada; }
body[data-theme="dark"] .ins-kpis article:nth-child(2) { border-top-color: #55c69a; }
body[data-theme="dark"] .ins-kpis article:nth-child(3) { border-top-color: #a492dc; }
body[data-theme="dark"] .ins-kpis article:nth-child(4) { border-top-color: #e6ad63; }
body[data-theme="dark"] .ins-ratios .ins-ratio-selected { background: rgba(52,91,88,.32); border-color: rgba(85,207,194,.3); }
body[data-theme="dark"] .ins-ratio-mark { color: #6fc9d2; background: rgba(65,161,174,.15); }
body[data-theme="dark"] .ins-ratios article:nth-child(2) .ins-ratio-mark { color: #7bd1ac; background: rgba(85,198,154,.13); }
body[data-theme="dark"] .ins-ratios article:nth-child(3) .ins-ratio-mark { color: #b7a7e6; background: rgba(164,146,220,.14); }
body[data-theme="dark"] .ins-ratios article:nth-child(4) .ins-ratio-mark { color: #efc17e; background: rgba(230,173,99,.14); }
body[data-theme="dark"] .ins-empty { color: #b2c3c8; background: rgba(255,255,255,.035); border-color: rgba(205,231,234,.18); }
body[data-theme="dark"] .ins-bars span { color: #b5c6ca; }
body[data-theme="dark"] .ins-bars strong { color: #e5eff0; }
body[data-theme="dark"] .ins-bar-track,
body[data-theme="dark"] .ins-meter { background: rgba(224,242,244,.1); }
body[data-theme="dark"] .ins-bar-track i { background: linear-gradient(90deg,#57bada,#55c69a); }
body[data-theme="dark"] .ins-ring-base { stroke: rgba(224,242,244,.12); }
body[data-theme="dark"] .ins-ring-number { fill: #effafa; }
body[data-theme="dark"] .ins-ring-caption,
body[data-theme="dark"] .ins-axis { fill: #a2b5bb; }
body[data-theme="dark"] .ins-value-label { fill: #d2e4e7; }
body[data-theme="dark"] .ins-gridline { stroke: rgba(204,229,233,.14); }
body[data-theme="dark"] .ins-ring-legend button { color: #b4c5ca; }
body[data-theme="dark"] .ins-ring-legend button:hover { color: #f0f8f8; background: rgba(255,255,255,.06); }
body[data-theme="dark"] .ins-ring-legend strong { color: #e5f0f1; }
body[data-theme="dark"] .ins-chart-hint { color: #a1b5bb !important; }
body[data-theme="dark"] .ins-multi-series .ins-point-dot { fill: #162b35; }
body[data-theme="dark"] .ins-multi-legend span { color: #b3c3c8; background: rgba(255,255,255,.045); border-color: rgba(205,231,234,.12); }
body[data-theme="dark"] .ins-unit-bars,
body[data-theme="dark"] .ins-performance-note { background: rgba(255,255,255,.045); border-color: rgba(205,231,234,.14); }
body[data-theme="dark"] .ins-unit-bars h4,
body[data-theme="dark"] .ins-unit-lines h4,
body[data-theme="dark"] .ins-production-machine-grid > section > h3,
body[data-theme="dark"] .ins-production-time > h3 { color: #b7c9ce; }
body[data-theme="dark"] .ins-performance-note p,
body[data-theme="dark"] .ins-performance-meta { color: #aec1c6; }
body[data-theme="dark"] .ins-performance-note strong,
body[data-theme="dark"] .ins-performance-meta strong { color: #e4eff0; }
body[data-theme="dark"] .ins-performance-index { color: #80d5ce; background: rgba(67,216,196,.1); }
body[data-theme="dark"] .ins-view th { color: #c2d5d9; background: rgba(103,140,151,.18); border-color: rgba(205,231,234,.14); }
body[data-theme="dark"] .ins-view td { color: #cbdadd; border-color: rgba(205,231,234,.12); }
body[data-theme="dark"] .ins-view td strong { color: #eff8f8; }
body[data-theme="dark"] .ins-view td small { color: #a9bec4; }
body[data-theme="dark"] .ins-view tbody tr:hover { background: rgba(85,207,194,.07); }
body[data-theme="dark"] .ins-note { color: #c0d2d6; background: rgba(67,216,196,.07); border-color: #55cfc2; }
body[data-theme="dark"] .ins-performance-card { border-color: rgba(205,231,234,.13) !important; }
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .ins-toolbar input,
body[data-theme="dark"] .ins-toolbar select { color: #e5f1f2; background: rgba(7,21,30,.62); border-color: rgba(194,224,228,.22); accent-color: #55cfc2; }
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder { color: #9aafb5; }
body[data-theme="dark"] select option { color: #e5f1f2; background: #132630; }
body[data-theme="dark"] input:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus { outline-color: rgba(85,207,194,.28); border-color: #55cfc2; }
body[data-theme="dark"] .ins-view button:not(.ins-ring-legend button),
body[data-theme="dark"] .demo-change-role { color: #d7e8ea; background: rgba(255,255,255,.06); border-color: rgba(205,231,234,.19); }
body[data-theme="dark"] .ins-view button:hover { background-color: rgba(255,255,255,.11); border-color: rgba(205,231,234,.3); }
body[data-theme="dark"] .ins-view button.primary,
body[data-theme="dark"] .ins-publish .primary,
body[data-theme="dark"] .ins-toolbar .primary { color: #082124; background: linear-gradient(135deg,#69ded1,#3bb7ab); border-color: #65d8cc; box-shadow: 0 4px 15px rgba(67,216,196,.17); }
body[data-theme="dark"] .ins-view button.primary:hover { background: #7cebdd; }
body[data-theme="dark"] .demo-message { color: #f7fbfb; background: rgba(16,43,51,.94); border: 1px solid rgba(111,222,212,.24); box-shadow: 0 14px 40px rgba(1,8,14,.35); backdrop-filter: blur(15px); }
body[data-theme="dark"] .ins-ratio-mark svg,
body[data-theme="dark"] .demo-nav-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-theme="dark"] .ins-ratio-mark svg { width: 16px; height: 16px; }
body[data-theme="dark"] .ins-xy text,
body[data-theme="dark"] .ins-ring text { font-family: "Arial Narrow", "Aptos Narrow", "Segoe UI", Arial, sans-serif !important; }
@media (max-width:760px) {
  body[data-theme="dark"] .sidebar { background: rgba(8,22,31,.83); }
}
@media (prefers-reduced-transparency: reduce) {
  body[data-theme="dark"] header,
  body[data-theme="dark"] .demo-banner,
  body[data-theme="dark"] .sidebar,
  body[data-theme="dark"] .ins-view .card,
  body[data-theme="dark"] .view > .card { background: #142a35; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Tema claro: paleta técnica alternativa y gráficos con más aire. */
body[data-theme="crystal"] {
  --ins-accent: #315f78;
  --ins-green: #3c8a74;
  --ins-amber: #bd8246;
  --chart-blue: #365f86;
  --chart-teal: #2f8a7c;
  --chart-amber: #c58a43;
  --chart-slate: #87719a;
  --chart-aqua: #548f9d;
  --chart-rose: #bd6d63;
}
body[data-theme="crystal"] .demo-title small,
body[data-theme="crystal"] .demo-banner strong { color: #315f78; }
body[data-theme="crystal"] .ins-status { margin: 9px 0 13px; }
body[data-theme="crystal"] .ins-section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 23px 0 13px;
  padding: 0 2px 10px;
  border-bottom: 1px solid rgba(68,105,119,.18);
}
body[data-theme="crystal"] .ins-section-heading > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  color: #315f78;
  background: rgba(54,95,134,.11);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
body[data-theme="crystal"] .ins-section-heading strong,
body[data-theme="crystal"] .ins-section-heading small { display: block; }
body[data-theme="crystal"] .ins-section-heading strong {
  color: #294955;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: .01em;
}
body[data-theme="crystal"] .ins-section-heading small {
  margin-top: 2px;
  color: #657b81;
  font-size: 11px;
  line-height: 1.45;
}
body[data-theme="crystal"] .ins-ratios { gap: 15px; margin: 0 0 17px; }
body[data-theme="crystal"] .ins-ratios article {
  min-height: 88px;
  padding: 16px 18px;
  border-radius: 11px;
}
body[data-theme="crystal"] .ins-ratios article:nth-child(1) { border-top: 3px solid #365f86; }
body[data-theme="crystal"] .ins-ratios article:nth-child(2) { border-top: 3px solid #2f8a7c; }
body[data-theme="crystal"] .ins-ratios article:nth-child(3) { border-top: 3px solid #87719a; }
body[data-theme="crystal"] .ins-ratios article:nth-child(4) { border-top: 3px solid #c58a43; }
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin: 0 0 25px;
}
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts > .card {
  min-height: 226px;
  padding: 17px 19px 14px;
  border-radius: 12px;
  background: rgba(252,254,254,.72);
  border: 1px solid rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(42,76,86,.08), inset 0 1px rgba(255,255,255,.96);
}
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts > .card:nth-child(1) { border-top: 3px solid #365f86; }
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts > .card:nth-child(2) { border-top: 3px solid #2f8a7c; }
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts > .card:nth-child(3) { border-top: 3px solid #c58a43; }
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts > .card:nth-child(4) { border-top: 3px solid #87719a; }
body[data-theme="crystal"] .ins-production-donuts .ins-card-title {
  min-height: 0;
  margin-bottom: 7px;
}
body[data-theme="crystal"] .ins-production-donuts .ins-card-title h2 {
  color: #2b4650;
  font-size: 15px;
  line-height: 1.35;
}
body[data-theme="crystal"] .ins-production-donuts .ins-card-title small { font-size: 11px; }
body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts .ins-ring {
  display: grid;
  grid-template-columns: minmax(130px, 42%) minmax(0, 1fr);
  align-items: center;
  gap: 0 15px;
}
body[data-theme="crystal"] .ins-production-donuts .ins-ring-picture {
  width: min(100%, 176px);
  max-width: 176px;
  grid-row: 1 / span 2;
}
body[data-theme="crystal"] .ins-production-donuts .ins-ring-number { font-size: 27px; }
body[data-theme="crystal"] .ins-production-donuts .ins-ring-caption { font-size: 11px; }
body[data-theme="crystal"] .ins-production-donuts .ins-ring-legend { gap: 5px; min-width: 0; }
body[data-theme="crystal"] .ins-production-donuts .ins-ring-legend button {
  grid-template-columns: 10px minmax(0,1fr) auto;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 6px;
  font-size: 11px;
}
body[data-theme="crystal"] .ins-production-donuts .ins-ring-legend i { width: 9px; height: 9px; }
body[data-theme="crystal"] .ins-production-donuts .ins-ring-legend strong { font-size: 11px; }
body[data-theme="crystal"] .ins-production-donuts .ins-chart-hint { grid-column: 1 / -1; margin-top: 7px; }
body[data-theme="crystal"] .ins-work-machines,
body[data-theme="crystal"] .ins-work-performance {
  margin: 0 0 25px;
  padding: 22px 23px;
  border-radius: 12px;
}
body[data-theme="crystal"] .ins-work-machines .ins-card-title,
body[data-theme="crystal"] .ins-work-performance .ins-card-title {
  padding-bottom: 14px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(68,105,119,.16);
}
body[data-theme="crystal"] .ins-work-machines .ins-card-title h2,
body[data-theme="crystal"] .ins-work-performance .ins-card-title h2 { font-size: 17px; }
body[data-theme="crystal"] .ins-work-machines .ins-card-title small,
body[data-theme="crystal"] .ins-work-performance .ins-card-title small { font-size: 11px; }
body[data-theme="crystal"] .ins-production-machine-grid { gap: 20px; padding: 7px 0 18px; }
body[data-theme="crystal"] .ins-production-machine-grid > section > h3,
body[data-theme="crystal"] .ins-production-time > h3 { font-size: 13px; margin-bottom: 14px; }
body[data-theme="crystal"] .ins-work-machines .ins-bars { gap: 14px 30px; max-height: 380px; }
body[data-theme="crystal"] .ins-work-machines .ins-bars > div { grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 72px; gap: 12px; font-size: 12px; }
body[data-theme="crystal"] .ins-work-machines .ins-bars span,
body[data-theme="crystal"] .ins-work-machines .ins-bars strong { font-size: 12px; }
body[data-theme="crystal"] .ins-work-machines .ins-bar-track { height: 12px; border-radius: 6px; }
body[data-theme="crystal"] .ins-bar-track i { background: linear-gradient(90deg,#365f86,#2f8a7c); }
body[data-theme="crystal"] .ins-work-performance .ins-performance-grid { gap: 18px; }
body[data-theme="crystal"] .ins-work-performance .ins-performance-card {
  padding: 20px 22px !important;
  border-radius: 10px;
  background: rgba(255,255,255,.48);
}
body[data-theme="crystal"] .ins-performance-head h3 { font-size: 14px; }
body[data-theme="crystal"] .ins-performance-head > b { color: #315f78; font-size: 20px; }
body[data-theme="crystal"] .ins-performance-meta,
body[data-theme="crystal"] .ins-performance-head > div > small { font-size: 10px; }
body[data-theme="crystal"] .ins-multi-legend { gap: 8px; padding-top: 12px; }
body[data-theme="crystal"] .ins-multi-legend span { font-size: 10px; padding: 5px 8px; }
body[data-theme="crystal"] .ins-chart-hint { font-size: 12px !important; }
body[data-theme="dark"] .ins-section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 23px 0 13px;
  padding: 0 2px 10px;
  border-bottom: 1px solid rgba(187,216,222,.2);
}
@media (max-width: 760px) {
  body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts { grid-template-columns: 1fr; gap: 13px; }
  body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts > .card { min-height: 0; }
  body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts .ins-ring { grid-template-columns: minmax(140px, 38%) minmax(0,1fr); }
  body[data-theme="crystal"] .ins-work-machines,
  body[data-theme="crystal"] .ins-work-performance { padding: 16px; }
  body[data-theme="crystal"] .ins-work-machines .ins-bars > div { grid-template-columns: minmax(90px,1fr) minmax(80px,2fr) 58px; }
}
@media (max-width: 1100px) {
  body[data-theme="crystal"] .ins-work-machines .ins-bars { grid-template-columns: 1fr; }
  body[data-theme="crystal"] .ins-work-machines .ins-bars > div { grid-template-columns: minmax(100px,1fr) minmax(100px,2.4fr) 68px; }
}
@media (max-width: 430px) {
  body[data-theme="crystal"] .ins-donut-grid.ins-production-donuts .ins-ring { grid-template-columns: 1fr; }
  body[data-theme="crystal"] .ins-production-donuts .ins-ring-picture { width: 174px; margin: 0 auto; grid-row: auto; }
  body[data-theme="crystal"] .ins-production-donuts .ins-ring-legend,
  body[data-theme="crystal"] .ins-production-donuts .ins-chart-hint { grid-column: 1; }
}

/* Contraste final y tipografía compartida: mantener legibles todos los módulos en ambos temas. */
body[data-theme="crystal"],
body[data-theme="dark"],
body[data-theme="crystal"] button,
body[data-theme="dark"] button,
body[data-theme="crystal"] input,
body[data-theme="dark"] input,
body[data-theme="crystal"] select,
body[data-theme="dark"] select,
body[data-theme="crystal"] textarea,
body[data-theme="dark"] textarea {
  font-family: "Arial Narrow", Arial, sans-serif;
}
body[data-theme="crystal"] .ins-view,
body[data-theme="dark"] .ins-view { font-size: 13px; line-height: 1.5; }
body[data-theme="crystal"] .ins-view .card,
body[data-theme="crystal"] .view > .card {
  background-color: rgba(250,253,253,.86);
  border-color: rgba(255,255,255,.96);
}
body[data-theme="dark"] .ins-view .card,
body[data-theme="dark"] .view > .card {
  background-color: rgba(20,39,49,.91);
  border-color: rgba(194,222,227,.22);
}
body[data-theme="crystal"] .ins-kpis article,
body[data-theme="crystal"] .ins-ratios article,
body[data-theme="crystal"] .ins-work-performance .ins-performance-card {
  background-color: rgba(255,255,255,.88);
  border-color: rgba(89,125,139,.2);
}
body[data-theme="dark"] .ins-kpis article,
body[data-theme="dark"] .ins-ratios article,
body[data-theme="dark"] .ins-work-performance .ins-performance-card {
  background-color: rgba(8,24,33,.68);
  border-color: rgba(194,222,227,.22);
}
body[data-theme="crystal"] .ins-view h1,
body[data-theme="crystal"] .ins-view h2,
body[data-theme="crystal"] .ins-view h3,
body[data-theme="crystal"] .ins-view h4,
body[data-theme="crystal"] .ins-view th,
body[data-theme="crystal"] .ins-ratios strong,
body[data-theme="crystal"] .ins-kpis strong { color: #263f4b; }
body[data-theme="crystal"] .ins-view p,
body[data-theme="crystal"] .ins-view label,
body[data-theme="crystal"] .ins-view small,
body[data-theme="crystal"] .ins-view td,
body[data-theme="crystal"] .ins-view .ins-status,
body[data-theme="crystal"] .ins-view .ins-bars span,
body[data-theme="crystal"] .ins-view .ins-bars strong,
body[data-theme="crystal"] .ins-view .ins-performance-meta,
body[data-theme="crystal"] .ins-view .ins-multi-legend span,
body[data-theme="crystal"] .ins-view .ins-ring-legend button,
body[data-theme="crystal"] .ins-view .ins-series-heading { color: #435e6c; }
body[data-theme="crystal"] .ins-view .ins-chart-hint,
body[data-theme="crystal"] .ins-view .ins-empty,
body[data-theme="crystal"] .ins-view .ins-note,
body[data-theme="crystal"] .ins-view .ins-performance-note p,
body[data-theme="crystal"] .ins-view .ins-production-time > h3,
body[data-theme="crystal"] .ins-view .ins-production-machine-grid > section > h3 { color: #4b6675 !important; }
body[data-theme="dark"] .ins-view h1,
body[data-theme="dark"] .ins-view h2,
body[data-theme="dark"] .ins-view h3,
body[data-theme="dark"] .ins-view h4,
body[data-theme="dark"] .ins-view th,
body[data-theme="dark"] .ins-view td,
body[data-theme="dark"] .ins-view td strong,
body[data-theme="dark"] .ins-view .ins-bars span,
body[data-theme="dark"] .ins-view .ins-bars strong,
body[data-theme="dark"] .ins-view .ins-ring-legend button,
body[data-theme="dark"] .ins-view .ins-ring-legend strong,
body[data-theme="dark"] .ins-ratios strong,
body[data-theme="dark"] .ins-kpis strong { color: #e6f0f2; }
body[data-theme="dark"] .ins-view p,
body[data-theme="dark"] .ins-view label,
body[data-theme="dark"] .ins-view small,
body[data-theme="dark"] .ins-view td small,
body[data-theme="dark"] .ins-view .ins-status,
body[data-theme="dark"] .ins-view .ins-performance-meta,
body[data-theme="dark"] .ins-view .ins-multi-legend span,
body[data-theme="dark"] .ins-view .ins-series-heading { color: #b9cbd0; }
body[data-theme="dark"] .ins-view .ins-chart-hint,
body[data-theme="dark"] .ins-view .ins-empty,
body[data-theme="dark"] .ins-view .ins-note,
body[data-theme="dark"] .ins-view .ins-performance-note p,
body[data-theme="dark"] .ins-view .ins-production-time > h3,
body[data-theme="dark"] .ins-view .ins-production-machine-grid > section > h3 { color: #c1d1d5 !important; }
body[data-theme="crystal"] .ins-view th { background: rgba(219,232,237,.9); border-color: #d3e0e5; }
body[data-theme="crystal"] .ins-view td { border-color: rgba(90,120,132,.18); }
body[data-theme="dark"] .ins-view th { background: rgba(89,123,135,.3); border-color: rgba(194,222,227,.2); }
body[data-theme="dark"] .ins-view td { border-color: rgba(194,222,227,.15); }
body[data-theme="crystal"] .ins-view input,
body[data-theme="crystal"] .ins-view select,
body[data-theme="crystal"] .ins-view textarea {
  color: #263f4b;
  background: rgba(255,255,255,.92);
  border-color: #afc4ce;
}
body[data-theme="crystal"] .ins-view input::placeholder,
body[data-theme="crystal"] .ins-view textarea::placeholder { color: #617783; opacity: 1; }
body[data-theme="dark"] .ins-view input,
body[data-theme="dark"] .ins-view select,
body[data-theme="dark"] .ins-view textarea {
  color: #e6f0f2;
  background: rgba(5,18,26,.88);
  border-color: rgba(194,222,227,.32);
}
body[data-theme="dark"] .ins-view input::placeholder,
body[data-theme="dark"] .ins-view textarea::placeholder { color: #b2c4c9; opacity: 1; }
body[data-theme="crystal"] .ins-view select option { color: #263f4b; background: #fff; }
body[data-theme="dark"] .ins-view select option { color: #e6f0f2; background: #142731; }
body[data-theme="crystal"] .ins-view button:not(.ins-ring-legend button) {
  color: #294b5e;
  background: rgba(255,255,255,.9);
  border-color: #b9cbd3;
}
body[data-theme="crystal"] .ins-view button:hover { color: #173e51; background: #fff; border-color: #7fa3b3; }
body[data-theme="dark"] .ins-view button:not(.ins-ring-legend button) {
  color: #dbe9ec;
  background: rgba(224,243,245,.08);
  border-color: rgba(194,222,227,.28);
}
body[data-theme="dark"] .ins-view button:hover { color: #fff; background: rgba(224,243,245,.15); border-color: rgba(194,222,227,.42); }
body[data-theme="crystal"] .ins-view button.primary,
body[data-theme="crystal"] .ins-publish .primary,
body[data-theme="crystal"] .ins-toolbar .primary {
  color: #fff;
  background: #315f78;
  border-color: #315f78;
}
body[data-theme="dark"] .ins-view button.primary,
body[data-theme="dark"] .ins-publish .primary,
body[data-theme="dark"] .ins-toolbar .primary {
  color: #09232b;
  background: #67d3c6;
  border-color: #67d3c6;
}
body[data-theme="crystal"] .ins-view button:disabled { color: #7e929b; background: #e7edef; border-color: #d7e0e3; }
body[data-theme="dark"] .ins-view button:disabled { color: #81969c; background: #263b44; border-color: #334b55; }
body[data-theme="crystal"] .ins-view :focus-visible { outline: 3px solid rgba(49,95,120,.32); outline-offset: 2px; }
body[data-theme="dark"] .ins-view :focus-visible { outline: 3px solid rgba(103,211,198,.38); outline-offset: 2px; }
body[data-theme="crystal"] .ins-empty,
body[data-theme="crystal"] .ins-note,
body[data-theme="crystal"] .ins-performance-note,
body[data-theme="crystal"] .ins-unit-bars,
body[data-theme="crystal"] .ins-unit-lines,
body[data-theme="crystal"] .ins-goal-number,
body[data-theme="crystal"] .ins-chart-types { background-color: rgba(239,246,248,.94); border-color: #d2e0e5; }
body[data-theme="dark"] .ins-empty,
body[data-theme="dark"] .ins-note,
body[data-theme="dark"] .ins-performance-note,
body[data-theme="dark"] .ins-unit-bars,
body[data-theme="dark"] .ins-unit-lines,
body[data-theme="dark"] .ins-goal-number,
body[data-theme="dark"] .ins-chart-types { background-color: rgba(8,22,30,.8); border-color: rgba(194,222,227,.2); }
body[data-theme="crystal"] .ins-chart-types button { color: #4e6977; }
body[data-theme="dark"] .ins-chart-types button { color: #b7cbd0; }
body[data-theme="crystal"] .ins-chart-types button.active { color: #244f67; background: #fff; }
body[data-theme="dark"] .ins-chart-types button.active { color: #122a31; background: #a8e8df; }
body[data-theme="crystal"] .ins-bar-track,
body[data-theme="crystal"] .ins-meter,
body[data-theme="crystal"] .ins-goal-track { background: #dce7eb; }
body[data-theme="dark"] .ins-bar-track,
body[data-theme="dark"] .ins-meter,
body[data-theme="dark"] .ins-goal-track { background: rgba(218,237,240,.17); }
body[data-theme="crystal"] .ins-gridline { stroke: rgba(65,94,108,.2); }
body[data-theme="crystal"] .ins-axis { fill: #607987; }
body[data-theme="crystal"] .ins-value-label { fill: #365b72; }
body[data-theme="dark"] .ins-axis { fill: #b4c7cc; }
body[data-theme="dark"] .ins-value-label { fill: #e1eff1; }
body[data-theme="crystal"] .ins-ring-caption { fill: #526c79; }
body[data-theme="dark"] .ins-ring-caption { fill: #c3d4d8; }
body[data-theme="crystal"] .ins-ratios small,
body[data-theme="crystal"] .ins-ratios span:not(.ins-ratio-mark),
body[data-theme="crystal"] .ins-kpis article small,
body[data-theme="crystal"] .ins-kpis article span { color: #526a76; }
body[data-theme="dark"] .ins-ratios small,
body[data-theme="dark"] .ins-ratios span:not(.ins-ratio-mark),
body[data-theme="dark"] .ins-kpis article small,
body[data-theme="dark"] .ins-kpis article span { color: #bdcdd1; }
body[data-theme="crystal"] .ins-view .ins-ring-legend button,
body[data-theme="crystal"] .ins-view .ins-multi-legend span { font-size: 12px; }
body[data-theme="dark"] .ins-view .ins-ring-legend button,
body[data-theme="dark"] .ins-view .ins-multi-legend span { font-size: 12px; }
body[data-theme="crystal"] .ins-view th,
body[data-theme="crystal"] .ins-view td,
body[data-theme="dark"] .ins-view th,
body[data-theme="dark"] .ins-view td,
body[data-theme="crystal"] .ins-view .ins-toolbar label,
body[data-theme="dark"] .ins-view .ins-toolbar label,
body[data-theme="crystal"] .ins-view .ins-toolbar select,
body[data-theme="dark"] .ins-view .ins-toolbar select,
body[data-theme="crystal"] .ins-view .ins-work-machines .fields label,
body[data-theme="dark"] .ins-view .ins-work-machines .fields label,
body[data-theme="crystal"] .ins-view .ins-work-performance .fields label,
body[data-theme="dark"] .ins-view .ins-work-performance .fields label { font-size: 12px; }
body[data-theme="crystal"] .ins-xy text,
body[data-theme="crystal"] .ins-ring text,
body[data-theme="dark"] .ins-xy text,
body[data-theme="dark"] .ins-ring text {
  font-family: "Arial Narrow", Arial, sans-serif !important;
}
body[data-theme="crystal"] dialog { color: #263f4b; background: #f8fbfc; border-color: #c7d7de; }
body[data-theme="dark"] dialog { color: #e6f0f2; background: #142731; border-color: rgba(194,222,227,.26); }
body[data-theme="dark"] .ins-section-heading > span {
  color: #83ded4;
  background: rgba(103,211,198,.15);
}
body[data-theme="dark"] .ins-section-heading strong { color: #e6f0f2; font-size: 14px; line-height: 1.4; }
body[data-theme="dark"] .ins-section-heading small { color: #b9cbd0; font-size: 12px; line-height: 1.5; }
body[data-theme="crystal"] .ins-view small,
body[data-theme="dark"] .ins-view small { font-size: 12px; }
body[data-theme="crystal"] .demo-banner,
body[data-theme="dark"] .demo-banner { font-size: 13px; }
body[data-theme="crystal"] .demo-palette button,
body[data-theme="dark"] .demo-palette button,
body[data-theme="crystal"] .sidebar > button,
body[data-theme="dark"] .sidebar > button { font-size: 12px; }
body[data-theme="crystal"] .panel-caption,
body[data-theme="dark"] .panel-caption,
body[data-theme="crystal"] .demo-sidebar-label,
body[data-theme="dark"] .demo-sidebar-label,
body[data-theme="crystal"] .sidebar > small,
body[data-theme="dark"] .sidebar > small { font-size: 11px; }
body[data-theme="crystal"] .demo-foot,
body[data-theme="dark"] .demo-foot { font-size: 11px; }

/* Selector de tema de la plataforma productiva. */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(130,158,171,.3);
  border-radius: 8px;
}
.theme-switch .header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 12px;
}
body[data-theme="crystal"] .theme-switch { background: rgba(255,255,255,.32); border-color: rgba(61,98,113,.25); }
body[data-theme="crystal"] .theme-switch [aria-pressed="true"] { color: #fff; background: #315f78; border-color: #315f78; }
body[data-theme="dark"] .theme-switch { background: rgba(0,0,0,.16); border-color: rgba(194,222,227,.2); }
body[data-theme="dark"] .theme-switch [aria-pressed="true"] { color: #08252d; background: #67d3c6; border-color: #67d3c6; }
.demo-real-link { color: #214f65; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) {
  .theme-switch { margin-left: auto; }
  .theme-switch .header-button { min-height: 32px; padding: 5px 8px; }
}
@media (max-width: 550px) {
  .theme-switch .theme-label { display: none; }
  .theme-switch .header-button { width: 30px; min-height: 30px; padding: 3px; font-size: 16px; }
}
@media (max-width: 420px) {
  body[data-theme] header { gap: 7px; padding-right: 8px; padding-left: 8px; }
  body[data-theme] header img { width: 138px; }
  .theme-switch { gap: 1px; padding: 2px; }
  .theme-switch .header-button { width: 26px; height: 28px; min-height: 28px; }
  #changePassword { padding: 5px 6px; font-size: 9px; }
  #logout { padding: 5px 6px; font-size: 10px; }
}
