/*! Runic 1.0.0 */
/* 00-tokens.css */
/* Fundamentos: tokens de diseño. Tema oscuro por defecto; tema claro con [data-theme="light"].
   Paleta base: WatchTower (trabajo #1), con primary en verde pistacho. */
:root {
  color-scheme: dark;

  /* Paleta base (referencia WatchTower) */
  --ib-black: #101820;
  --ib-bright-black: #35424c;
  --ib-white: #c5d0d8;
  --ib-bright-white: #f2f6f8;
  --ib-blue: #2589b8;
  --ib-bright-blue: #42bde8;
  --ib-cyan: #20b9c7;
  --ib-bright-cyan: #55e5ef;
  --ib-green: #71b88a;
  --ib-bright-green: #91d6a5;
  --ib-purple: #a878c5;
  --ib-bright-purple: #c69ae0;
  --ib-red: #d95757;
  --ib-bright-red: #ff7777;
  --ib-yellow: #d9a928;
  --ib-bright-yellow: #ffd34e;

  /* Primary: verde pistacho (#8FBC5A, elegido por Raúl; en tema claro se oscurece para cumplir contraste) */
  --ib-primary: #8fbc5a;
  --ib-primary-hover: #a0c96d;
  --ib-primary-active: #7eaa4c;
  --ib-primary-soft: rgb(143 188 90 / 0.14);
  --ib-on-primary: #0f1a08;

  /* Superficies y texto (tema oscuro) */
  --ib-bg: #0c0c0c;
  --ib-bg-raised: #12171c;
  --ib-surface: #161c22;
  --ib-surface-2: #1d252d;
  --ib-surface-3: #26313b;
  --ib-border: #2a343d;
  --ib-border-strong: #3d4b57;
  --ib-text: #e3e8ec;
  --ib-text-muted: #9aa7b2;
  --ib-text-faint: #6c7a86;
  --ib-link: var(--ib-primary);
  --ib-selection: rgb(240 179 35 / 0.35);
  --ib-focus: #f0b323;
  --ib-overlay: rgb(5 8 11 / 0.72);

  /* Semánticos */
  --ib-info: var(--ib-bright-blue);
  --ib-info-soft: rgb(66 189 232 / 0.14);
  --ib-success: var(--ib-green);
  --ib-success-soft: rgb(113 184 138 / 0.16);
  --ib-gold: #8a6500;
  --ib-gold-soft: rgb(217 169 40 / 0.18);
  --ib-gold-line: rgb(138 101 0 / 0.5);
  --ib-mark-grad: linear-gradient(135deg, var(--ib-primary) 0%, var(--ib-primary) 40%, color-mix(in srgb, var(--ib-gold) 75%, var(--ib-primary)) 100%);
  --ib-mark-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='180 166 700 700'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M 487.500 242.640 C 465.476 245.915, 448.738 250.076, 431.129 256.656 C 388.908 272.431, 350.561 302.843, 327.669 338.706 C 314.072 360.008, 303.875 388.204, 300.438 414 C 298.637 427.515, 298.647 451.605, 300.459 465 C 305.192 499.984, 320.625 534.343, 344.351 562.714 C 348.392 567.546, 352.666 572.357, 353.849 573.405 C 356.548 575.795, 356.587 578.413, 353.964 581.036 C 351.955 583.045, 351.055 583.071, 287.569 582.956 C 216.100 582.827, 219.774 582.496, 214.399 589.544 C 212.182 592.450, 211.618 594.391, 211.275 600.295 C 210.920 606.392, 211.212 608.191, 213.178 611.992 C 215.699 616.869, 220.193 620.404, 225.882 621.984 C 230.850 623.364, 367.951 623.308, 373.958 621.924 C 384.061 619.596, 393.704 612.745, 398.483 604.500 C 402.995 596.716, 404.248 583.617, 401.407 573.932 C 399.067 565.958, 395.402 560.086, 383.036 544.501 C 369.354 527.256, 364.123 519.513, 357.418 506.578 C 341.199 475.290, 336.696 437.861, 345.138 404.500 C 354.892 365.956, 379.315 332.348, 414 309.740 C 474.565 270.264, 555.656 270.286, 614.500 309.795 C 629.546 319.898, 646.146 336.129, 657.663 352 C 684.916 389.557, 693.249 441.728, 678.950 485.274 C 672.033 506.339, 662.173 522.004, 645.086 539.078 C 623.040 561.105, 594.398 573.973, 558.500 577.979 C 553.550 578.532, 524.593 578.987, 494.151 578.992 L 438.802 579 445.151 583.664 C 486.506 614.041, 494.758 620.846, 593.268 705.792 C 657.259 760.973, 691.934 780.178, 740.743 787.470 C 752.709 789.257, 780.180 789.504, 791.678 787.927 C 812.537 785.066, 833.102 778.303, 840.355 771.918 C 852.548 761.186, 847.478 739.252, 832.138 736.364 C 828.363 735.653, 827.510 735.848, 805.661 742.434 C 790.844 746.900, 778.192 748.431, 762.044 747.713 C 739.344 746.703, 723.729 742.419, 699.500 730.555 C 671.715 716.950, 655.043 704.799, 607.500 663.502 C 593.750 651.559, 576.995 637.447, 570.268 632.143 L 558.035 622.500 566.954 621.303 C 597.151 617.249, 625.736 605.957, 651.261 588 C 662.252 580.267, 683.347 559.625, 691.423 548.699 C 711.624 521.369, 722.327 492.430, 726.062 455.041 C 729.851 417.115, 717.380 371.897, 693.040 335.307 C 662.454 289.328, 611.804 256.219, 555.500 245.401 C 542.931 242.986, 538.893 242.685, 516 242.452 C 501.975 242.310, 489.150 242.394, 487.500 242.640 M 220.316 683.943 C 209.226 688.978, 206.657 706.080, 215.517 715.887 C 217.470 718.049, 220.594 720.161, 222.829 720.831 C 228.110 722.413, 498.637 722.506, 504.321 720.928 C 518.266 717.056, 522.827 697.557, 512.146 687.476 C 510.419 685.846, 507.542 683.981, 505.753 683.332 C 503.315 682.448, 467.678 682.139, 363.500 682.098 C 229.023 682.046, 224.364 682.106, 220.316 683.943'/%3E%3C/svg%3E");
  --ib-glow: 0 0 14px rgb(77 122 31 / 0.18);
  --ib-star: rgb(16 24 32 / 0.35);
  --ib-night: #e4eaec;
  --ib-warning: var(--ib-yellow);
  --ib-warning-soft: rgb(217 169 40 / 0.16);
  --ib-danger: var(--ib-bright-red);
  --ib-danger-soft: rgb(255 119 119 / 0.14);
  --ib-accent: var(--ib-bright-purple);
  --ib-accent-soft: rgb(198 154 224 / 0.14);

  /* Tipografía */
  /* Dirección mitológico-digital: filamento dorado (WatchTower yellow), halo y constelación */
  --ib-gold: #d9a928;
  --ib-gold-soft: rgb(217 169 40 / 0.16);
  --ib-gold-line: rgb(217 169 40 / 0.55);
  --ib-glow: 0 0 18px rgb(143 188 90 / 0.28);
  --ib-star: rgb(242 246 248 / 0.55);
  --ib-night: #0a1216;

  --ib-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ib-font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --ib-text-xs: 0.75rem;
  --ib-text-sm: 0.875rem;
  --ib-text-md: 1rem;
  --ib-text-lg: 1.125rem;
  --ib-text-xl: 1.375rem;
  --ib-text-2xl: 1.75rem;
  --ib-text-3xl: 2.25rem;
  --ib-leading-tight: 1.25;
  --ib-leading-normal: 1.5;
  --ib-weight-regular: 400;
  --ib-weight-medium: 500;
  --ib-weight-bold: 700;

  /* Espaciado (escala de 4 px) */
  --ib-space-1: 0.25rem;
  --ib-space-2: 0.5rem;
  --ib-space-3: 0.75rem;
  --ib-space-4: 1rem;
  --ib-space-5: 1.5rem;
  --ib-space-6: 2rem;
  --ib-space-7: 3rem;
  --ib-space-8: 4rem;

  /* Bordes, sombras, movimiento */
  --ib-radius-sm: 6px;
  --ib-radius-md: 10px;
  --ib-radius-lg: 16px;
  --ib-radius-pill: 999px;
  --ib-border-width: 1px;
  --ib-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --ib-shadow-md: 0 6px 18px rgb(0 0 0 / 0.4);
  --ib-shadow-lg: 0 18px 48px rgb(0 0 0 / 0.55);
  --ib-ease: cubic-bezier(0.2, 0, 0, 1);
  --ib-duration: 140ms;

  /* Capas */
  --ib-z-sticky: 20;
  --ib-z-dropdown: 40;
  --ib-z-dialog: 60;
  --ib-z-toast: 80;
  --ib-z-tooltip: 90;

  /* Controles */
  --ib-control-h: 2.5rem;
  --ib-control-h-sm: 2rem;
  --ib-control-h-lg: 3rem;
  --ib-touch: 44px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --ib-primary: #4d7a1f;
  --ib-primary-hover: #426a1a;
  --ib-primary-active: #385a16;
  --ib-primary-soft: rgb(77 122 31 / 0.12);
  --ib-on-primary: #ffffff;
  --ib-bg: #f4f6f7;
  --ib-bg-raised: #eceff1;
  --ib-surface: #ffffff;
  --ib-surface-2: #f0f3f5;
  --ib-surface-3: #e3e8eb;
  --ib-border: #d7dde2;
  --ib-border-strong: #b6c0c8;
  --ib-text: #1b232a;
  --ib-text-muted: #55636e;
  --ib-text-faint: #7b8893;
  --ib-link: #3a6414;
  --ib-selection: rgb(240 179 35 / 0.4);
  --ib-focus: #b57f00;
  --ib-overlay: rgb(20 28 34 / 0.5);
  --ib-info: #17739a;
  --ib-info-soft: rgb(23 115 154 / 0.1);
  --ib-success: #2f7a4b;
  --ib-success-soft: rgb(47 122 75 / 0.1);
  --ib-warning: #8a6500;
  --ib-warning-soft: rgb(217 169 40 / 0.18);
  --ib-danger: #b83a3a;
  --ib-danger-soft: rgb(184 58 58 / 0.1);
  --ib-accent: #7d4ea0;
  --ib-accent-soft: rgb(125 78 160 / 0.1);
  --ib-shadow-sm: 0 1px 2px rgb(20 30 40 / 0.12);
  --ib-shadow-md: 0 6px 18px rgb(20 30 40 / 0.14);
  --ib-shadow-lg: 0 18px 48px rgb(20 30 40 / 0.22);
}

@media (prefers-reduced-motion: reduce) {
  :root { --ib-duration: 0ms; }
}

/* 10-base.css */
/* Base: reset ligero, tipografía y utilidades de maquetación. */
.ib, .ib *, .ib *::before, .ib *::after { box-sizing: border-box; }
html.ib, body.ib, .ib-root {
  background: var(--ib-bg);
  color: var(--ib-text);
  font: var(--ib-weight-regular) var(--ib-text-md)/var(--ib-leading-normal) var(--ib-font-sans);
  -webkit-font-smoothing: antialiased;
}
body.ib { margin: 0; }
.ib ::selection { background: var(--ib-selection); color: inherit; }
.ib :focus-visible { outline: 2px solid var(--ib-focus); outline-offset: 2px; }

.ib h1, .ib h2, .ib h3, .ib h4 { margin: 0 0 var(--ib-space-3); line-height: var(--ib-leading-tight); font-weight: var(--ib-weight-bold); }
.ib h1 { font-size: var(--ib-text-2xl); }
.ib h2 { font-size: var(--ib-text-xl); }
.ib h3 { font-size: var(--ib-text-lg); }
.ib h4 { font-size: var(--ib-text-md); }
.ib p { margin: 0 0 var(--ib-space-3); }
.ib a, .ib-link { color: var(--ib-link); text-underline-offset: 3px; }
.ib a:hover, .ib-link:hover { text-decoration-thickness: 2px; }
.ib code, .ib kbd, .ib pre, .ib-mono { font-family: var(--ib-font-mono); font-size: 0.9em; }
.ib code { background: var(--ib-surface-2); border: 1px solid var(--ib-border); border-radius: var(--ib-radius-sm); padding: 0.1em 0.4em; }
.ib pre { background: var(--ib-bg-raised); border: 1px solid var(--ib-border); border-radius: var(--ib-radius-md); padding: var(--ib-space-4); overflow: auto; margin: 0 0 var(--ib-space-4); }
.ib pre code { background: none; border: 0; padding: 0; }
.ib kbd { display: inline-block; min-width: 1.6em; padding: 0.1em 0.45em; text-align: center; background: var(--ib-surface-2); border: 1px solid var(--ib-border-strong); border-bottom-width: 2px; border-radius: var(--ib-radius-sm); }
.ib hr, .ib-divider { border: 0; border-top: var(--ib-border-width) solid var(--ib-border); margin: var(--ib-space-4) 0; }
.ib-divider--label { display: flex; align-items: center; gap: var(--ib-space-3); border: 0; color: var(--ib-text-muted); font-size: var(--ib-text-sm); }
.ib-divider--label::before, .ib-divider--label::after { content: ""; flex: 1; border-top: var(--ib-border-width) solid var(--ib-border); }
.ib-divider--vertical { display: inline-block; align-self: stretch; width: 0; margin: 0 var(--ib-space-2); border-top: 0; border-left: var(--ib-border-width) solid var(--ib-border); }

.ib-text-muted { color: var(--ib-text-muted); }
.ib-text-faint { color: var(--ib-text-faint); }
.ib-text-sm { font-size: var(--ib-text-sm); }
.ib-text-xs { font-size: var(--ib-text-xs); }
.ib-text-center { text-align: center; }
.ib-eyebrow { font-size: var(--ib-text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ib-text-muted); font-weight: var(--ib-weight-bold); }
.ib-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ib-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Maquetación */
.ib-container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--ib-space-4); }
.ib-container--narrow { max-width: 46rem; }
.ib-stack { display: flex; flex-direction: column; gap: var(--ib-space-4); }
.ib-stack--sm { gap: var(--ib-space-2); }
.ib-stack--lg { gap: var(--ib-space-6); }
.ib-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ib-space-3); }
.ib-cluster--between { justify-content: space-between; }
.ib-cluster--end { justify-content: flex-end; }
.ib-grid { display: grid; gap: var(--ib-space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.ib-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.ib-grow { flex: 1 1 auto; min-width: 0; }

/* Shell de aplicación: barra superior o lateral + contenido */
.ib-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100dvh; }
.ib-shell--topbar { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.ib-shell__main { padding: var(--ib-space-5); min-width: 0; }
@media (max-width: 760px) {
  .ib-shell { grid-template-columns: minmax(0, 1fr); }
  .ib-shell__main { padding: var(--ib-space-4); }
}
.ib-page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--ib-space-3); margin-bottom: var(--ib-space-5); }
.ib-page-header h1 { margin: 0; }
.ib-page-header__sub { color: var(--ib-text-muted); margin: var(--ib-space-1) 0 0; }

/* 20-basic.css */
/* Botones, iconos, badges, etiquetas, tarjetas, avisos */

/* Iconos (sprite SVG: <svg class="ib-icon"><use href="#ib-i-name"/></svg>) */
.ib-icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.ib-icon--sm { width: 1em; height: 1em; }
.ib-icon--lg { width: 1.75em; height: 1.75em; }
.ib-icon-tile { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--ib-radius-md); background: var(--ib-primary-soft); color: var(--ib-primary); }

/* Botones */
.ib-btn {
  --_bg: var(--ib-surface-2); --_fg: var(--ib-text); --_bd: var(--ib-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ib-space-2);
  min-height: var(--ib-control-h); padding: 0 var(--ib-space-4);
  font: inherit; font-weight: var(--ib-weight-medium); line-height: 1; text-decoration: none; white-space: nowrap;
  color: var(--_fg); background: var(--_bg); border: var(--ib-border-width) solid var(--_bd); border-radius: var(--ib-radius-md);
  cursor: pointer; transition: background var(--ib-duration) var(--ib-ease), border-color var(--ib-duration) var(--ib-ease), transform var(--ib-duration) var(--ib-ease);
}
.ib-btn:hover:not(:disabled):not([aria-disabled="true"]) { --_bg: var(--ib-surface-3); }
.ib-btn:active:not(:disabled) { transform: translateY(1px); }
.ib-btn:disabled, .ib-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.ib-btn--primary { --_bg: var(--ib-primary); --_fg: var(--ib-on-primary); --_bd: var(--ib-primary); font-weight: var(--ib-weight-bold); }
.ib-btn--primary:hover:not(:disabled):not([aria-disabled="true"]) { --_bg: var(--ib-primary-hover); --_bd: var(--ib-primary-hover); }
.ib-btn--primary:active:not(:disabled) { --_bg: var(--ib-primary-active); }
.ib-btn--ghost { --_bg: transparent; --_bd: transparent; --_fg: var(--ib-text-muted); }
.ib-btn--ghost:hover:not(:disabled):not([aria-disabled="true"]) { --_bg: var(--ib-surface-2); --_fg: var(--ib-text); }
.ib-btn--outline { --_bg: transparent; --_bd: var(--ib-primary); --_fg: var(--ib-primary); }
.ib-btn--outline:hover:not(:disabled):not([aria-disabled="true"]) { --_bg: var(--ib-primary-soft); }
.ib-btn--danger { --_bg: transparent; --_bd: var(--ib-danger); --_fg: var(--ib-danger); }
.ib-btn--danger:hover:not(:disabled):not([aria-disabled="true"]) { --_bg: var(--ib-danger-soft); }
.ib-btn--danger-solid { --_bg: var(--ib-danger); --_bd: var(--ib-danger); --_fg: #140808; font-weight: var(--ib-weight-bold); }
.ib-btn--danger-solid:hover:not(:disabled):not([aria-disabled="true"]) { --_bg: var(--ib-bright-red); }
.ib-btn--sm { min-height: var(--ib-control-h-sm); padding: 0 var(--ib-space-3); font-size: var(--ib-text-sm); }
.ib-btn--lg { min-height: var(--ib-control-h-lg); padding: 0 var(--ib-space-5); font-size: var(--ib-text-lg); }
.ib-btn--block { display: flex; width: 100%; }
.ib-btn--icon { padding: 0; width: var(--ib-control-h); }
.ib-btn--icon.ib-btn--sm { width: var(--ib-control-h-sm); }
.ib-btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.ib-btn[aria-busy="true"]::after { content: ""; position: absolute; width: 1.1em; height: 1.1em; border: 2px solid var(--_fg); border-right-color: transparent; border-radius: 50%; animation: ib-spin 0.7s linear infinite; }
.ib-btn-group { display: inline-flex; }
.ib-btn-group > .ib-btn { border-radius: 0; margin-left: -1px; }
.ib-btn-group > .ib-btn:first-child { border-radius: var(--ib-radius-md) 0 0 var(--ib-radius-md); margin-left: 0; }
.ib-btn-group > .ib-btn:last-child { border-radius: 0 var(--ib-radius-md) var(--ib-radius-md) 0; }
.ib-btn-group > .ib-btn[aria-pressed="true"] { --_bg: var(--ib-primary-soft); --_bd: var(--ib-primary); --_fg: var(--ib-primary); position: relative; z-index: 1; }
@keyframes ib-spin { to { transform: rotate(360deg); } }
@media (pointer: coarse) { .ib-btn { min-height: var(--ib-touch); } }

/* Enlaces */
.ib-link--muted { color: var(--ib-text-muted); }
.ib-link--quiet { text-decoration: none; }
.ib-link--quiet:hover { text-decoration: underline; }

/* Badges y etiquetas */
.ib-badge {
  --_c: var(--ib-text-muted); --_bg: var(--ib-surface-2);
  display: inline-flex; align-items: center; gap: 0.35em; padding: 0.1rem 0.55rem;
  font-size: var(--ib-text-xs); font-weight: var(--ib-weight-medium); line-height: 1.5; white-space: nowrap;
  color: var(--_c); background: var(--_bg); border: var(--ib-border-width) solid color-mix(in srgb, var(--_c) 45%, transparent); border-radius: var(--ib-radius-pill);
}
.ib-badge--primary { --_c: var(--ib-primary); --_bg: var(--ib-primary-soft); }
.ib-badge--info { --_c: var(--ib-info); --_bg: var(--ib-info-soft); }
.ib-badge--success { --_c: var(--ib-success); --_bg: var(--ib-success-soft); }
.ib-badge--warning { --_c: var(--ib-warning); --_bg: var(--ib-warning-soft); }
.ib-badge--danger { --_c: var(--ib-danger); --_bg: var(--ib-danger-soft); }
.ib-badge--accent { --_c: var(--ib-accent); --_bg: var(--ib-accent-soft); }
.ib-badge--dot::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; }
.ib-tag { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.15rem 0.5rem; font-size: var(--ib-text-xs); color: var(--ib-text-muted); background: var(--ib-surface-2); border-radius: var(--ib-radius-sm); }
.ib-tag button { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; border-radius: 50%; }
.ib-tag button:hover { background: var(--ib-surface-3); color: var(--ib-text); }
.ib-tag button:focus-visible { outline: 2px solid var(--ib-focus); }
.ib-status { display: inline-flex; align-items: center; gap: 0.5em; font-size: var(--ib-text-sm); }
.ib-status::before { content: ""; width: 0.65em; height: 0.65em; border-radius: 50%; background: var(--_c, var(--ib-text-faint)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_c, var(--ib-text-faint)) 25%, transparent); }
.ib-status--ok { --_c: var(--ib-success); }
.ib-status--warn { --_c: var(--ib-warning); }
.ib-status--bad { --_c: var(--ib-danger); }
.ib-status--info { --_c: var(--ib-info); }

/* Tarjetas */
.ib-card { background: var(--ib-surface); border: var(--ib-border-width) solid var(--ib-border); border-radius: var(--ib-radius-md); padding: var(--ib-space-4); box-shadow: var(--ib-shadow-sm); }
.ib-card > :last-child { margin-bottom: 0; }
.ib-card__title { font-size: var(--ib-text-lg); font-weight: var(--ib-weight-bold); margin: 0 0 var(--ib-space-1); }
.ib-card__sub { color: var(--ib-text-muted); font-size: var(--ib-text-sm); margin: 0 0 var(--ib-space-3); }
.ib-card__footer { display: flex; flex-wrap: wrap; gap: var(--ib-space-2); margin-top: var(--ib-space-4); padding-top: var(--ib-space-3); border-top: var(--ib-border-width) solid var(--ib-border); }
.ib-card--flat { box-shadow: none; }
.ib-card--attention { border-color: var(--ib-warning); }
.ib-card--primary { border-color: color-mix(in srgb, var(--ib-primary) 55%, var(--ib-border)); }
.ib-card--link { display: flex; gap: var(--ib-space-3); align-items: flex-start; color: inherit; text-decoration: none; transition: border-color var(--ib-duration) var(--ib-ease), transform var(--ib-duration) var(--ib-ease); }
.ib-card--link:hover, .ib-card--link:focus-visible { border-color: var(--ib-primary); transform: translateY(-1px); }
.ib-card--glass { background: color-mix(in srgb, var(--ib-surface) 85%, transparent); backdrop-filter: blur(8px); box-shadow: var(--ib-shadow-lg); }
.ib-stat { display: flex; flex-direction: column; gap: var(--ib-space-1); }
.ib-stat__value { font-size: var(--ib-text-2xl); font-weight: var(--ib-weight-bold); line-height: 1; }
.ib-stat__label { color: var(--ib-text-muted); font-size: var(--ib-text-sm); }

/* Avisos */
.ib-alert { --_c: var(--ib-info); --_bg: var(--ib-info-soft); display: flex; gap: var(--ib-space-3); align-items: flex-start; padding: var(--ib-space-3) var(--ib-space-4); background: var(--_bg); border: var(--ib-border-width) solid color-mix(in srgb, var(--_c) 40%, transparent); border-left: 4px solid var(--_c); border-radius: var(--ib-radius-md); }
.ib-alert > .ib-icon { color: var(--_c); margin-top: 0.1em; }
.ib-alert__body { flex: 1; min-width: 0; }
.ib-alert__title { font-weight: var(--ib-weight-bold); margin: 0; }
.ib-alert__body > :last-child { margin-bottom: 0; }
.ib-alert--success { --_c: var(--ib-success); --_bg: var(--ib-success-soft); }
.ib-alert--warning { --_c: var(--ib-warning); --_bg: var(--ib-warning-soft); }
.ib-alert--danger { --_c: var(--ib-danger); --_bg: var(--ib-danger-soft); }
.ib-alert--primary { --_c: var(--ib-primary); --_bg: var(--ib-primary-soft); }

/* 30-forms.css */
/* Formularios y controles */
.ib-field { display: flex; flex-direction: column; gap: var(--ib-space-1); margin: 0; }
.ib-label { font-size: var(--ib-text-sm); font-weight: var(--ib-weight-medium); color: var(--ib-text); }
.ib-label--required::after { content: " *"; color: var(--ib-danger); }
.ib-help { font-size: var(--ib-text-xs); color: var(--ib-text-muted); margin: 0; }
.ib-error-text { font-size: var(--ib-text-xs); color: var(--ib-danger); margin: 0; font-weight: var(--ib-weight-medium); }
.ib-success-text { font-size: var(--ib-text-xs); color: var(--ib-success); margin: 0; }

.ib-input, .ib-select, .ib-textarea {
  width: 100%; min-height: var(--ib-control-h); padding: 0 var(--ib-space-3);
  font: inherit; color: var(--ib-text); background: var(--ib-bg-raised);
  border: var(--ib-border-width) solid var(--ib-border-strong); border-radius: var(--ib-radius-md);
  transition: border-color var(--ib-duration) var(--ib-ease), box-shadow var(--ib-duration) var(--ib-ease);
}
.ib-textarea { padding: var(--ib-space-2) var(--ib-space-3); min-height: 6rem; resize: vertical; }
.ib-input::placeholder, .ib-textarea::placeholder { color: var(--ib-text-faint); }
.ib-input:hover:not(:disabled), .ib-select:hover:not(:disabled), .ib-textarea:hover:not(:disabled) { border-color: var(--ib-text-faint); }
.ib-input:focus, .ib-select:focus, .ib-textarea:focus { outline: none; border-color: var(--ib-primary); box-shadow: 0 0 0 3px var(--ib-primary-soft); }
.ib-input:disabled, .ib-select:disabled, .ib-textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.ib-input[readonly] { background: var(--ib-surface-2); }
.ib-input[aria-invalid="true"], .ib-select[aria-invalid="true"], .ib-textarea[aria-invalid="true"], .ib-field--invalid .ib-input { border-color: var(--ib-danger); }
.ib-input[aria-invalid="true"]:focus, .ib-textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--ib-danger-soft); }
.ib-input--valid { border-color: var(--ib-success); }
.ib-input--sm, .ib-select--sm { min-height: var(--ib-control-h-sm); font-size: var(--ib-text-sm); }
.ib-select { appearance: none; padding-right: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa7b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 1.1rem; }
.ib-input-group { display: flex; }
.ib-input-group > .ib-input { border-radius: 0; margin-left: -1px; }
.ib-input-group > :first-child { border-radius: var(--ib-radius-md) 0 0 var(--ib-radius-md); margin-left: 0; }
.ib-input-group > :last-child { border-radius: 0 var(--ib-radius-md) var(--ib-radius-md) 0; }
.ib-input-group__addon { display: inline-flex; align-items: center; padding: 0 var(--ib-space-3); color: var(--ib-text-muted); background: var(--ib-surface-2); border: var(--ib-border-width) solid var(--ib-border-strong); margin-left: -1px; }
.ib-input-group__addon:first-child { margin-left: 0; }
.ib-input[type="file"] { padding: 0.45rem var(--ib-space-3); }
.ib-input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1); }
.ib-fieldset { border: var(--ib-border-width) solid var(--ib-border); border-radius: var(--ib-radius-md); padding: var(--ib-space-3) var(--ib-space-4) var(--ib-space-4); margin: 0; }
.ib-fieldset > legend { padding: 0 var(--ib-space-2); font-weight: var(--ib-weight-medium); font-size: var(--ib-text-sm); }
.ib-form { display: flex; flex-direction: column; gap: var(--ib-space-4); }
.ib-form-actions { display: flex; flex-wrap: wrap; gap: var(--ib-space-2); justify-content: flex-end; }

/* Casillas, radios, interruptor */
.ib-check { display: inline-flex; align-items: center; gap: var(--ib-space-2); cursor: pointer; min-height: 1.75rem; }
.ib-check input { appearance: none; flex: none; width: 1.15rem; height: 1.15rem; margin: 0; display: inline-grid; place-items: center; background: var(--ib-bg-raised); border: var(--ib-border-width) solid var(--ib-border-strong); border-radius: 4px; cursor: pointer; }
.ib-check input[type="radio"] { border-radius: 50%; }
.ib-check input::after { content: ""; width: 0.65rem; height: 0.65rem; transform: scale(0); transition: transform var(--ib-duration) var(--ib-ease); background: var(--ib-on-primary); clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 86% 8%, 40% 71%); }
.ib-check input[type="radio"]::after { clip-path: circle(40%); }
.ib-check input:checked { background: var(--ib-primary); border-color: var(--ib-primary); }
.ib-check input:checked::after { transform: scale(1); }
.ib-check input:indeterminate { background: var(--ib-primary); border-color: var(--ib-primary); }
.ib-check input:indeterminate::after { transform: scale(1); clip-path: inset(40% 5% 40% 5%); width: 0.7rem; }
.ib-check input:disabled { opacity: 0.5; cursor: not-allowed; }
.ib-check input:disabled + span { opacity: 0.6; }
.ib-check input[aria-invalid="true"] { border-color: var(--ib-danger); }
.ib-switch { display: inline-flex; align-items: center; gap: var(--ib-space-2); cursor: pointer; }
.ib-switch input { appearance: none; flex: none; width: 2.5rem; height: 1.4rem; margin: 0; position: relative; border-radius: var(--ib-radius-pill); background: var(--ib-surface-3); border: var(--ib-border-width) solid var(--ib-border-strong); cursor: pointer; transition: background var(--ib-duration) var(--ib-ease); }
.ib-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; border-radius: 50%; background: var(--ib-text); transition: transform var(--ib-duration) var(--ib-ease); }
.ib-switch input:checked { background: var(--ib-primary); border-color: var(--ib-primary); }
.ib-switch input:checked::after { transform: translateX(1.1rem); background: var(--ib-on-primary); }
.ib-switch input:disabled { opacity: 0.5; cursor: not-allowed; }
.ib-range { width: 100%; accent-color: var(--ib-primary); }

/* Selector segmentado */
.ib-segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--ib-bg-raised); border: var(--ib-border-width) solid var(--ib-border); border-radius: var(--ib-radius-md); }
.ib-segmented label { position: relative; }
.ib-segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ib-segmented span { display: block; padding: 0.35rem 0.8rem; border-radius: calc(var(--ib-radius-md) - 3px); font-size: var(--ib-text-sm); color: var(--ib-text-muted); }
.ib-segmented input:checked + span { background: var(--ib-primary); color: var(--ib-on-primary); font-weight: var(--ib-weight-bold); }
.ib-segmented input:focus-visible + span { outline: 2px solid var(--ib-focus); outline-offset: 1px; }

/* 40-navigation.css */
/* Navegación, cabeceras, menús, pestañas, migas, pasos */
.ib-topbar { position: sticky; top: 0; z-index: var(--ib-z-sticky); display: flex; flex-wrap: wrap; align-items: center; gap: var(--ib-space-2) var(--ib-space-4); padding: var(--ib-space-2) var(--ib-space-4); background: var(--ib-bg-raised); border-bottom: var(--ib-border-width) solid var(--ib-border); }
.ib-logo { display: inline-flex; align-items: center; gap: var(--ib-space-2); font-weight: var(--ib-weight-bold); letter-spacing: 0.04em; color: var(--ib-text); text-decoration: none; }
.ib-logo__mark { display: inline-block; width: 1.9rem; height: 1.9rem; background: var(--ib-mark-color, var(--ib-mark-grad)); -webkit-mask: var(--ib-mark-mask) center / contain no-repeat; mask: var(--ib-mark-mask) center / contain no-repeat; }
.ib-nav { display: flex; flex-wrap: wrap; gap: var(--ib-space-1); margin: 0; padding: 0; list-style: none; }
.ib-nav a, .ib-nav button { position: relative; display: inline-flex; align-items: center; gap: var(--ib-space-2); padding: 0.5rem 0.75rem; font: inherit; font-size: var(--ib-text-sm); color: var(--ib-text-muted); background: none; border: 0; border-radius: 0; text-decoration: none; cursor: pointer; transition: color 0.2s; }
.ib-nav a::after, .ib-nav button::after { content: ""; position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0; height: 2px; background: var(--ib-primary); opacity: 0.7; transform: scaleX(0); transform-origin: center; transition: transform 0.28s cubic-bezier(.2,.7,.2,1), opacity 0.2s; }
.ib-nav a:hover, .ib-nav button:hover { color: var(--ib-text); }
.ib-nav a:hover::after, .ib-nav button:hover::after, .ib-nav a:focus-visible::after, .ib-nav button:focus-visible::after { transform: scaleX(1); }
.ib-nav a[aria-current="page"], .ib-nav button[aria-current="page"] { color: var(--ib-primary); }
.ib-nav a[aria-current="page"]::after, .ib-nav button[aria-current="page"]::after { transform: scaleX(1); opacity: 1; height: 3px; }
.ib-nav a:focus-visible, .ib-nav button:focus-visible { outline: 2px solid var(--ib-focus); outline-offset: -2px; }

.ib-sidebar { display: flex; flex-direction: column; gap: var(--ib-space-4); padding: var(--ib-space-4) var(--ib-space-3); background: var(--ib-bg-raised); border-right: var(--ib-border-width) solid var(--ib-border); position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.ib-sidebar__section { display: flex; flex-direction: column; gap: 2px; }
.ib-sidebar__title { padding: 0 var(--ib-space-3); margin-bottom: var(--ib-space-1); font-size: var(--ib-text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ib-text-faint); font-weight: var(--ib-weight-bold); }
.ib-sidebar .ib-nav { flex-direction: column; flex-wrap: nowrap; }
.ib-sidebar .ib-nav a, .ib-sidebar .ib-nav button { padding: 0.5rem 0.75rem; }
/* Indicador vertical: en el borde derecho del elemento en la barra izquierda, en el izquierdo en la derecha */
.ib-sidebar .ib-nav a::after, .ib-sidebar .ib-nav button::after { left: auto; right: 0; top: 0.25rem; bottom: 0.25rem; width: 3px; height: auto; border-radius: 2px; transform: scaleY(0); }
.ib-sidebar .ib-nav a:hover::after, .ib-sidebar .ib-nav button:hover::after, .ib-sidebar .ib-nav a:focus-visible::after, .ib-sidebar .ib-nav button:focus-visible::after,
.ib-sidebar .ib-nav a[aria-current="page"]::after, .ib-sidebar .ib-nav button[aria-current="page"]::after { transform: scaleY(1); height: auto; }
.ib-sidebar--right { border-right: 0; border-left: var(--ib-border-width) solid var(--ib-border); }
.ib-sidebar--right .ib-nav a::after, .ib-sidebar--right .ib-nav button::after { right: auto; left: 0; }
@media (prefers-reduced-motion: reduce) { .ib-nav a::after, .ib-nav button::after { transition: none; } }
@media (max-width: 760px) { .ib-sidebar { position: static; height: auto; border-right: 0; border-bottom: var(--ib-border-width) solid var(--ib-border); } }

.ib-tabs { display: flex; gap: var(--ib-space-1); border-bottom: var(--ib-border-width) solid var(--ib-border); overflow-x: auto; }
.ib-tab { padding: 0.6rem 1rem; font: inherit; font-size: var(--ib-text-sm); color: var(--ib-text-muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.ib-tab:hover { color: var(--ib-text); }
.ib-tab[aria-selected="true"] { color: var(--ib-primary); border-bottom-color: var(--ib-primary); font-weight: var(--ib-weight-bold); }
.ib-tabpanel { padding: var(--ib-space-4) 0; }
.ib-tabpanel[hidden] { display: none; }

.ib-breadcrumbs { display: flex; flex-wrap: wrap; gap: var(--ib-space-2); margin: 0; padding: 0; list-style: none; font-size: var(--ib-text-sm); color: var(--ib-text-muted); }
.ib-breadcrumbs li + li::before { content: "/"; margin-right: var(--ib-space-2); color: var(--ib-text-faint); }
.ib-breadcrumbs a { color: var(--ib-text-muted); }
.ib-breadcrumbs [aria-current] { color: var(--ib-text); }

.ib-menu { min-width: 12rem; padding: var(--ib-space-1); margin: 0; list-style: none; background: var(--ib-surface); border: var(--ib-border-width) solid var(--ib-border-strong); border-radius: var(--ib-radius-md); box-shadow: var(--ib-shadow-md); }
.ib-menu__item { display: flex; align-items: center; gap: var(--ib-space-2); width: 100%; padding: 0.5rem 0.7rem; font: inherit; font-size: var(--ib-text-sm); text-align: left; color: var(--ib-text); background: none; border: 0; border-radius: var(--ib-radius-sm); text-decoration: none; cursor: pointer; }
.ib-menu__item:hover, .ib-menu__item:focus-visible { background: var(--ib-surface-3); outline: none; }
.ib-menu__item--danger { color: var(--ib-danger); }
.ib-menu__item[disabled], .ib-menu__item[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.ib-menu__sep { height: 1px; margin: var(--ib-space-1) 0; background: var(--ib-border); }
.ib-menu__label { padding: 0.4rem 0.7rem; font-size: var(--ib-text-xs); color: var(--ib-text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

.ib-stepper { display: flex; gap: var(--ib-space-2); margin: 0; padding: 0; list-style: none; counter-reset: ib-step; }
.ib-stepper__step { flex: 1; display: flex; flex-direction: column; gap: var(--ib-space-1); padding-top: var(--ib-space-2); border-top: 3px solid var(--ib-border-strong); font-size: var(--ib-text-sm); color: var(--ib-text-muted); counter-increment: ib-step; }
.ib-stepper__step::before { content: counter(ib-step); font-size: var(--ib-text-xs); font-weight: var(--ib-weight-bold); }
.ib-stepper__step[data-state="done"] { border-top-color: var(--ib-success); color: var(--ib-text); }
.ib-stepper__step[data-state="current"] { border-top-color: var(--ib-primary); color: var(--ib-primary); font-weight: var(--ib-weight-bold); }

.ib-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ib-space-1); margin: 0; padding: 0; list-style: none; }
.ib-pagination a, .ib-pagination span { display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem; padding: 0 0.5rem; font-size: var(--ib-text-sm); color: var(--ib-text-muted); border: var(--ib-border-width) solid transparent; border-radius: var(--ib-radius-sm); text-decoration: none; }
.ib-pagination a:hover { background: var(--ib-surface-2); color: var(--ib-text); }
.ib-pagination [aria-current="page"] { color: var(--ib-on-primary); background: var(--ib-primary); font-weight: var(--ib-weight-bold); }
.ib-pagination [aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

/* 50-data.css */
/* Tablas, listas, progreso, estados vacíos y de carga */
.ib-table-wrap { overflow-x: auto; border: var(--ib-border-width) solid var(--ib-border); border-radius: var(--ib-radius-md); background: var(--ib-surface); }
.ib-table { width: 100%; border-collapse: collapse; font-size: var(--ib-text-sm); }
.ib-table caption { padding: var(--ib-space-3); text-align: left; color: var(--ib-text-muted); }
.ib-table th, .ib-table td { padding: 0.65rem var(--ib-space-3); text-align: left; border-bottom: var(--ib-border-width) solid var(--ib-border); vertical-align: middle; }
.ib-table thead th { font-size: var(--ib-text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ib-text-muted); background: var(--ib-bg-raised); white-space: nowrap; }
.ib-table tbody tr:last-child td { border-bottom: 0; }
.ib-table tbody tr:hover { background: var(--ib-surface-2); }
.ib-table--striped tbody tr:nth-child(even) { background: color-mix(in srgb, var(--ib-surface-2) 55%, transparent); }
.ib-table--compact th, .ib-table--compact td { padding: 0.35rem var(--ib-space-3); }
.ib-table [aria-sort] { cursor: pointer; }
.ib-table [aria-sort="ascending"]::after { content: " ▲"; color: var(--ib-primary); }
.ib-table [aria-sort="descending"]::after { content: " ▼"; color: var(--ib-primary); }
.ib-table .ib-num { text-align: right; font-variant-numeric: tabular-nums; }

.ib-list { margin: 0; padding: 0; list-style: none; border: var(--ib-border-width) solid var(--ib-border); border-radius: var(--ib-radius-md); background: var(--ib-surface); }
.ib-list__item { display: flex; align-items: center; gap: var(--ib-space-3); padding: var(--ib-space-3) var(--ib-space-4); color: inherit; text-decoration: none; }
.ib-list__item + .ib-list__item { border-top: var(--ib-border-width) solid var(--ib-border); }
a.ib-list__item:hover { background: var(--ib-surface-2); }
.ib-list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-list__title { font-weight: var(--ib-weight-medium); overflow-wrap: anywhere; }
.ib-list__meta { font-size: var(--ib-text-sm); color: var(--ib-text-muted); }
.ib-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--ib-space-2) var(--ib-space-4); margin: 0; }
.ib-dl dt { color: var(--ib-text-muted); font-size: var(--ib-text-sm); }
.ib-dl dd { margin: 0; }
.ib-timeline { margin: 0; padding: 0 0 0 var(--ib-space-4); list-style: none; border-left: 2px solid var(--ib-border); }
.ib-timeline li { position: relative; padding: 0 0 var(--ib-space-4) var(--ib-space-3); }
.ib-timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--ib-space-4) - 6px); top: 0.35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--ib-primary); box-shadow: 0 0 0 3px var(--ib-bg); }

.ib-progress { --ib-value: 0%; height: 0.5rem; overflow: hidden; background: var(--ib-surface-3); border-radius: var(--ib-radius-pill); }
.ib-progress > span { display: block; height: 100%; width: var(--ib-value); background: var(--ib-primary); border-radius: inherit; transition: width 300ms var(--ib-ease); }
.ib-progress--success > span { background: var(--ib-success); }
.ib-progress--warning > span { background: var(--ib-warning); }
.ib-progress--danger > span { background: var(--ib-danger); }
.ib-progress--indeterminate > span { width: 40%; animation: ib-indeterminate 1.2s var(--ib-ease) infinite; }
@keyframes ib-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.ib-meter { display: flex; flex-direction: column; gap: var(--ib-space-1); font-size: var(--ib-text-sm); }
.ib-meter__head { display: flex; justify-content: space-between; color: var(--ib-text-muted); }

.ib-spinner { display: inline-block; width: 1.5rem; height: 1.5rem; border: 3px solid var(--ib-surface-3); border-top-color: var(--ib-primary); border-radius: 50%; animation: ib-spin 0.8s linear infinite; }
.ib-spinner--sm { width: 1rem; height: 1rem; border-width: 2px; }
.ib-skeleton { display: block; min-height: 1em; border-radius: var(--ib-radius-sm); background: linear-gradient(90deg, var(--ib-surface-2), var(--ib-surface-3), var(--ib-surface-2)); background-size: 200% 100%; animation: ib-shimmer 1.4s linear infinite; }
@keyframes ib-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ib-skeleton, .ib-spinner, .ib-progress--indeterminate > span { animation-duration: 3s; } }

.ib-empty { display: flex; flex-direction: column; align-items: center; gap: var(--ib-space-2); padding: var(--ib-space-7) var(--ib-space-4); text-align: center; color: var(--ib-text-muted); border: 1px dashed var(--ib-border-strong); border-radius: var(--ib-radius-md); }
.ib-empty__title { margin: 0; color: var(--ib-text); font-size: var(--ib-text-lg); font-weight: var(--ib-weight-bold); }
.ib-empty > .ib-icon { width: 2.5rem; height: 2.5rem; color: var(--ib-text-faint); }
.ib-avatar { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--ib-primary-soft); color: var(--ib-primary); font-weight: var(--ib-weight-bold); font-size: var(--ib-text-sm); }

/* 60-overlays.css */
/* Interacciones: diálogos, desplegables, tooltips, notificaciones */
.ib-dialog { width: min(32rem, calc(100vw - 2rem)); padding: 0; color: var(--ib-text); background: var(--ib-surface); border: var(--ib-border-width) solid var(--ib-border-strong); border-radius: var(--ib-radius-lg); box-shadow: var(--ib-shadow-lg); }
.ib-dialog::backdrop { background: var(--ib-overlay); backdrop-filter: blur(2px); }
.ib-dialog[open] { animation: ib-pop var(--ib-duration) var(--ib-ease); }
.ib-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ib-space-3); padding: var(--ib-space-4) var(--ib-space-4) 0; }
.ib-dialog__title { margin: 0; font-size: var(--ib-text-lg); }
.ib-dialog__body { padding: var(--ib-space-3) var(--ib-space-4); }
.ib-dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--ib-space-2); padding: var(--ib-space-3) var(--ib-space-4) var(--ib-space-4); }
@keyframes ib-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }

.ib-dropdown { position: relative; display: inline-block; }
.ib-dropdown > .ib-menu { position: absolute; z-index: var(--ib-z-dropdown); top: calc(100% + 6px); left: 0; }
.ib-dropdown--end > .ib-menu { left: auto; right: 0; }
.ib-dropdown > .ib-menu[hidden] { display: none; }

.ib-tooltip { position: relative; }
.ib-tooltip::after { content: attr(data-ib-tooltip); position: absolute; z-index: var(--ib-z-tooltip); left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 4px); padding: 0.3rem 0.55rem; width: max-content; max-width: 16rem; font-size: var(--ib-text-xs); font-weight: var(--ib-weight-regular); line-height: 1.35; white-space: normal; text-align: center; color: var(--ib-text); background: var(--ib-surface-3); border: var(--ib-border-width) solid var(--ib-border-strong); border-radius: var(--ib-radius-sm); box-shadow: var(--ib-shadow-md); opacity: 0; pointer-events: none; transition: opacity var(--ib-duration) var(--ib-ease), transform var(--ib-duration) var(--ib-ease); }
.ib-tooltip:hover::after, .ib-tooltip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.ib-tooltip--below::after { bottom: auto; top: calc(100% + 6px); }

.ib-toasts { position: fixed; z-index: var(--ib-z-toast); right: var(--ib-space-4); bottom: var(--ib-space-4); display: flex; flex-direction: column; gap: var(--ib-space-2); width: min(24rem, calc(100vw - 2rem)); pointer-events: none; }
.ib-toast { pointer-events: auto; display: flex; gap: var(--ib-space-3); align-items: flex-start; padding: var(--ib-space-3) var(--ib-space-4); background: var(--ib-surface); border: var(--ib-border-width) solid var(--ib-border-strong); border-left: 4px solid var(--_c, var(--ib-info)); border-radius: var(--ib-radius-md); box-shadow: var(--ib-shadow-lg); animation: ib-pop var(--ib-duration) var(--ib-ease); }
.ib-toast--success { --_c: var(--ib-success); }
.ib-toast--warning { --_c: var(--ib-warning); }
.ib-toast--danger { --_c: var(--ib-danger); }
.ib-toast__body { flex: 1; min-width: 0; }
.ib-toast__title { font-weight: var(--ib-weight-bold); margin: 0; }
.ib-toast__body p { margin: 0; font-size: var(--ib-text-sm); color: var(--ib-text-muted); }

.ib-popover { padding: var(--ib-space-3); background: var(--ib-surface); border: var(--ib-border-width) solid var(--ib-border-strong); border-radius: var(--ib-radius-md); box-shadow: var(--ib-shadow-md); }
.ib-accordion { border: var(--ib-border-width) solid var(--ib-border); border-radius: var(--ib-radius-md); background: var(--ib-surface); }
.ib-accordion details + details { border-top: var(--ib-border-width) solid var(--ib-border); }
.ib-accordion summary { cursor: pointer; padding: var(--ib-space-3) var(--ib-space-4); font-weight: var(--ib-weight-medium); }
.ib-accordion summary:hover { background: var(--ib-surface-2); }
.ib-accordion details > div { padding: 0 var(--ib-space-4) var(--ib-space-4); color: var(--ib-text-muted); }

/* Patrón: pantalla de acceso compartida (login) */

/* 70-identity.css */
/* Identidad mitológico-digital: motivos sobrios derivados del trazo monolínea con halo
   y del avatar de Eitri (filamento dorado, eje de simetría, constelación). Opcionales. */
.ib-eyebrow { font-family: var(--ib-font-mono); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ib-primary); }
.ib-rune-divider { display: flex; align-items: center; gap: var(--ib-space-3, 0.75rem); border: 0; margin: var(--ib-space-5, 1.5rem) 0; color: var(--ib-gold-line); }
.ib-rune-divider::before, .ib-rune-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor, transparent); }
.ib-rune-divider > span { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid currentColor; }
.ib-constellation {
  background-color: var(--ib-night);
  background-image:
    radial-gradient(1px 1px at 12% 22%, var(--ib-star), transparent),
    radial-gradient(1px 1px at 38% 68%, var(--ib-star), transparent),
    radial-gradient(1.5px 1.5px at 64% 30%, var(--ib-gold-line), transparent),
    radial-gradient(1px 1px at 82% 74%, var(--ib-star), transparent),
    radial-gradient(1px 1px at 91% 18%, var(--ib-star), transparent),
    radial-gradient(ellipse at 50% 0%, var(--ib-primary-soft), transparent 70%);
}
.ib-axis { position: relative; }
.ib-axis::before { content: ""; position: absolute; inset: 0 auto 0 50%; width: 1px; background: linear-gradient(180deg, transparent, var(--ib-gold-line), transparent); pointer-events: none; }
.ib-glow { box-shadow: var(--ib-glow); }
.ib-card--sigil { position: relative; }
.ib-card--sigil::before, .ib-card--sigil::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--ib-primary); opacity: 0.8; }
.ib-card--sigil::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ib-card--sigil::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* 72-mark.css */
/* Símbolo gráfico de identidad (monolínea). Geometría original vectorizada de icon_master_white_transparent.png.
   Se pinta con máscara: color por tokens (primary por defecto), cambia solo con el tema. */
.ib-mark { display: inline-block; flex: none; width: 1.75em; height: 1.75em; vertical-align: middle; background: var(--ib-mark-color, var(--ib-primary));
  -webkit-mask: var(--ib-mark-mask) center / contain no-repeat; mask: var(--ib-mark-mask) center / contain no-repeat; }
.ib-mark--mono { --ib-mark-color: currentColor; }
.ib-mark--gold { --ib-mark-color: var(--ib-gold); }
.ib-mark--gradient { background: var(--ib-mark-grad); }
.ib-mark--lg { width: 3.5rem; height: 3.5rem; }

/* 75-login.css */
/* Patrón de acceso seguro: tarjeta centrada, autorización en el móvil, recordar dispositivo y otras opciones. Usa el fondo ambiental de Runic y una marca neutra de ejemplo (cada aplicación pone la suya). */
.ib-login-wrap { display: grid; place-items: center; padding: var(--ib-space-4); min-height: 100%; color: var(--ib-text); }
.ib-login { position: relative; width: 100%; max-width: 380px; padding: 1.8rem 1.4rem 1.4rem; text-align: center; border: 1px solid transparent; border-radius: 16px;
  background: linear-gradient(var(--ib-bg-raised), var(--ib-bg-raised)) padding-box, linear-gradient(140deg, rgb(32 185 199 / 0.6), rgb(143 188 90 / 0.15) 45%, rgb(143 188 90 / 0.6)) border-box;
  box-shadow: 0 0 40px rgb(34 211 238 / 0.1), 0 20px 50px rgb(0 0 0 / 0.35); }
.ib-login__mark { display: block; width: 3.2rem; height: 3.2rem; margin: 0 auto .7rem; background: var(--ib-mark-grad); -webkit-mask: var(--ib-mark-mask) center / contain no-repeat; mask: var(--ib-mark-mask) center / contain no-repeat; }
.ib-login__title { font-size: 1.45rem; letter-spacing: .14em; text-transform: uppercase; margin: 0; font-weight: 700; background: linear-gradient(90deg, #22d3ee, var(--ib-primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ib-login__sub { margin: .2rem 0 1rem; color: var(--ib-text-muted); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }
.ib-login__hint { color: var(--ib-text-muted); margin: 0 0 .6rem; }
.ib-login__cta { width: 100%; min-height: 52px; font-weight: 700; letter-spacing: .04em; }
.ib-login .ib-check { justify-content: center; margin-top: .9rem; color: var(--ib-text-muted); }
.ib-login__alt { margin-top: 1.1rem; padding-top: .7rem; border-top: 1px solid var(--ib-border); }
.ib-login__alt summary { color: var(--ib-text-muted); font-size: .8rem; letter-spacing: .06em; list-style: none; cursor: pointer; }
.ib-login__alt summary::-webkit-details-marker { display: none; }
.ib-login__alt summary:hover { color: var(--ib-primary); }
.ib-login__alt[open] summary { margin-bottom: .5rem; }

/* 80-ambient.css */
/* Fondo ambiental común: constelaciones, runas y destellos tenues en los márgenes, dibujados en un <canvas>
   (src/js/runic.js). Se activa con <html data-ib-ambient> o Runic.ambient(true). Es decorativo (aria-hidden),
   no recibe eventos y deja libre la columna central. Reacciona al puntero (nodos que se apartan y brillan,
   hilos hacia el puntero) y mantiene movimiento autónomo en reposo. Si compitiera con el contenido, se corrige
   aquí (intensidad/máscara), no en cada app. */
html[data-ib-ambient] body.ib { background: transparent; }
.ib-ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  --_a: 1;
  --ib-amb-k: 1; --ib-amb-line: var(--ib-gold-line); --ib-amb-node: var(--ib-gold); --ib-amb-star: var(--ib-star);
  --ib-amb-rune: var(--ib-gold); --ib-amb-halo: var(--ib-primary); --ib-amb-link: var(--ib-primary);
  background:
    radial-gradient(ellipse 38% 55% at 0% 0%, var(--ib-primary-soft), transparent 70%),
    radial-gradient(ellipse 34% 50% at 100% 100%, var(--ib-gold-soft), transparent 70%);
  animation: ib-ambient-breathe 18s ease-in-out infinite alternate;
}
.ib-ambient canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--_a);
  -webkit-mask-image: linear-gradient(90deg, #000 0, rgb(0 0 0 / 0.9) 18%, transparent 34%, transparent 66%, rgb(0 0 0 / 0.9) 82%, #000 100%);
          mask-image: linear-gradient(90deg, #000 0, rgb(0 0 0 / 0.9) 18%, transparent 34%, transparent 66%, rgb(0 0 0 / 0.9) 82%, #000 100%); }
[data-theme="light"] .ib-ambient { --ib-amb-k: 1.5; --ib-amb-line: #7a5a00; --ib-amb-node: #7a5a00; --ib-amb-star: #3d4f5c; --ib-amb-rune: #7a5a00; --ib-amb-halo: #4d7a1f; --ib-amb-link: #3f6a15; }
@keyframes ib-ambient-breathe { from { opacity: 0.6; } to { opacity: 1; } }
@media (max-width: 800px) { .ib-ambient { --_a: 0.5; } }
@media (prefers-reduced-motion: reduce) { .ib-ambient { animation: none; } }
@media (prefers-contrast: more) { .ib-ambient { display: none; } }
