
:root {
  
  --primary-900: #0A2540;
  --primary-800: #11365E;
  --primary-700: #1A4D8C;
  --primary-600: #2563B0;
  --primary-500: #3B82D4;
  --primary-100: #DCE9F7;
  --primary-50:  #EEF4FB;

  
  --neutral-900: #1A1F2C;
  --neutral-800: #2C3342;  
  --neutral-700: #3D4759;
  --neutral-600: #4C5667;  
  --neutral-500: #5A6675;
  --neutral-400: #6B7688;  
  --neutral-300: #CBD2DD;
  --neutral-200: #E2E6ED;
  --neutral-100: #F1F3F7;
  --neutral-50:  #F8F9FB;
  --white: #FFFFFF;

  
  --success-900: #0A4023;  
  --success-700: #0F5C32;
  --success-600: #1E824C;  
  --success-500: #2EA866;
  --success-300: #82CCA4;  
  --success-100: #D7F0E1;
  --success-50:  #EBF7EE;
  --warning-800: #5F3F00;  
  --warning-700: #7A5100;
  --warning-600: #B07A14;  
  --warning-500: #E5A227;
  --warning-300: #F0C878;  
  --warning-200: #F6DAA0;  
  --warning-100: #FBEDC9;
  --warning-50:  #FDF7E7;
  --danger-800:  #8D1A25;  
  --danger-700:  #B0202E;
  --danger-600:  #C62A3A;  
  --danger-500:  #DC3545;
  --danger-400:  #E35D6A;  
  --danger-300:  #EA858F;  
  --danger-200:  #F1ADB4;  
  --danger-100:  #F8D5D9;
  --danger-50:   #FBEAEC;
  --info-900:    #0A4D66;  
  --info-700:    #0E6E91;
  --info-500:    #1797C4;
  --info-200:    #A3D8EA;  
  --info-100:    #D2EEF7;
  --info-50:     #E8F6FB;  

  
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px;

  
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 10px;

  
  --elev-0: none;
  --elev-1: 0 1px 2px rgba(15,23,42,0.05), 0 1px 3px rgba(15,23,42,0.05);
  --elev-2: 0 1px 2px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.07);
  --elev-3: 0 6px 16px rgba(15,23,42,0.09), 0 14px 34px rgba(15,23,42,0.11);
  
  --hairline: var(--neutral-200);

  
  --shadow-card:  var(--elev-2);
  --shadow-pop:   var(--elev-3);
  --shadow-md:    0 8px 24px rgba(15, 23, 42, 0.10);  
  --shadow-modal: 0 20px 44px rgba(15, 23, 42, 0.16);

  
  --font-ui:   "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--neutral-900);
  
  background: var(--neutral-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.uppercase-cap { text-transform: uppercase; letter-spacing: 0.04em; }


.erp-shell { min-height: 100vh; background: var(--neutral-100); }


.erp-topbar {
  position: sticky; top: 0; z-index: 40;
  height: 60px; padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--neutral-200);
  display: flex; align-items: center; gap: 20px;
}
.erp-topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 272px; }
.erp-topbar .brand-logo {
  width: 32px; height: 32px; flex: 0 0 auto;
  display: grid; place-items: center;
}
.erp-topbar .brand-logo img { width: 32px; height: 32px; object-fit: contain; display: block; }
.erp-topbar .brand-text .t1 { font-weight: 700; font-size: 15px; line-height: 1.1; color: var(--neutral-900); letter-spacing: -0.01em; }
.erp-topbar .brand-text .t2 { font-size: 11px; color: var(--neutral-500); margin-top: 1px; }

.erp-global-search {
  flex: 1; max-width: 480px; position: relative;
}
.erp-global-search input {
  width: 100%; height: 36px; padding: 0 12px 0 36px;
  background: var(--neutral-100); border: 1px solid var(--neutral-200); border-radius: var(--r-md);
  color: var(--neutral-900); font-size: 13px;
}
.erp-global-search input:focus { outline: none; background: #fff; border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(37,99,176,0.15); }
.erp-global-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--neutral-500); }
.erp-global-search .kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; background: #fff; border: 1px solid var(--neutral-200); border-radius: 4px; color: var(--neutral-500); }

.erp-topbar .top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.erp-topbar .top-action {
  height: 36px; padding: 0 12px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-md);
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  color: var(--neutral-700); font-size: 13px;
}
.erp-topbar .top-action:hover { background: var(--neutral-100); }
.erp-topbar .top-action--shortcut {
  background: var(--primary-700);
  border-color: var(--primary-700);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: background-color 120ms, border-color 120ms, box-shadow 120ms;
}
.erp-topbar .top-action--shortcut:hover {
  background: var(--primary-800);
  border-color: var(--primary-800);
  color: #fff;
  text-decoration: none;
}
.erp-topbar .top-action--shortcut:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 176, 0.24);
}
.erp-topbar .top-action .badge-red { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; background: var(--danger-700); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; }
.erp-topbar .avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--primary-100); color: var(--primary-700); display: grid; place-items: center; font-weight: 700; font-size: 13px; cursor: pointer; }
.erp-topbar .user-info {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  margin-left: 6px; padding: 4px 8px;
  border: 1px solid transparent; border-left-color: var(--neutral-200);
  border-radius: var(--r-lg);
  color: inherit; text-decoration: none;
  transition: background-color 120ms, border-color 120ms;
}
.erp-topbar .user-info:hover {
  background: var(--neutral-100);
  border-color: var(--neutral-200);
  text-decoration: none;
}
.erp-topbar .user-info .un { font-size: 13px; font-weight: 600; line-height: 1.1; color: var(--neutral-900); }
.erp-topbar .user-info .ur { font-size: 11px; color: var(--neutral-500); margin-top: 2px; }


.erp-layout { display: flex; min-height: calc(100vh - 60px); }
.erp-sidebar {
  
  --nav-bg: var(--primary-800);
  --nav-text: #F4F8FC;
  --nav-text-secondary: #C7D5E3;
  --nav-section-text: #B8C9DA;
  --nav-divider: rgba(218,232,245,.20);
  --nav-row-hover: rgba(255,255,255,.075);
  --nav-row-active: rgba(255,255,255,.13);
  --nav-row-border: rgba(255,255,255,.13);
  --nav-icon-bg: rgba(4,20,35,.18);
  --nav-icon-border: rgba(211,230,247,.20);
  --nav-icon-text: #D9EAF8;
  --nav-icon-active-bg: rgba(126,195,242,.18);
  --nav-icon-active-border: rgba(126,195,242,.55);
  --nav-sub-bg: rgba(2,14,25,.12);
  --nav-sub-text: #D1DEEA;
  --nav-accent: #7EC3F2;

  width: 272px; flex-shrink: 0;
  background: var(--nav-bg); color: var(--nav-text);
  display: flex; flex-direction: column;
  padding: 8px 8px 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky; top: 60px;
  height: calc(100dvh - 60px);
  overscroll-behavior: contain;
  scrollbar-color: rgba(255,255,255,.24) transparent;
  scrollbar-width: thin;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.07);
}
.erp-sidebar.collapsed { width: 64px; }
.erp-sidebar > nav { min-width: 0; }
.erp-sidebar-search-slot { display: none; }
.erp-sidebar .erp-nav-favorites {
  margin-bottom: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--nav-divider);
}
.erp-sidebar .nav-section {
  min-height: 28px;
  padding: 20px 10px 8px;
  color: var(--nav-section-text);
  font-size: 10.75px;
  font-weight: 700;
  letter-spacing: .105em;
  line-height: 1.2;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.erp-sidebar .nav-section:not(.nav-section--favorites)::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  margin-left: 3px;
  background: linear-gradient(90deg, var(--nav-divider), transparent);
}
.erp-sidebar .nav-section--first { padding-top: 14px; }
.erp-sidebar .nav-section--favorites {
  justify-content: space-between;
  padding-top: 7px;
  padding-bottom: 8px;
}
.erp-sidebar .nav-section .ico { color: var(--nav-section-text); }
.erp-sidebar .nav-section-edit {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--nav-text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: none;
}
.erp-sidebar .nav-section-edit:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}


.erp-nav-fav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.erp-nav-fav-item[hidden] { display: none; }
.erp-nav-favorites .erp-nav-row {
  min-height: 36px;
  gap: 8px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--nav-text-secondary);
  font-size: 13px;
  font-weight: 550;
}
.erp-nav-fav-remove {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--nav-text-secondary);
  cursor: pointer;
  opacity: .8;
  touch-action: manipulation;
  transition: background-color 120ms, border-color 120ms, color 120ms, opacity 120ms;
}
.erp-nav-fav-remove:hover {
  border-color: rgba(255,255,255,.16);
  background: rgba(220,53,69,.18);
  color: #fff;
  opacity: 1;
}
.erp-nav-fav-remove:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
  background: rgba(255,255,255,.1);
  opacity: 1;
}
.erp-nav-fav-remove:disabled {
  cursor: wait;
  opacity: .45;
}
.erp-nav-favorites .erp-nav-row .ico {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nav-text-secondary);
}
.erp-nav-favorites .erp-nav-row:hover {
  border-color: transparent;
  background: var(--nav-row-hover);
}
.erp-nav-favorites .erp-nav-row.active {
  border-color: color-mix(in srgb, var(--nav-row-border) 65%, transparent);
  background: var(--nav-row-hover);
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.erp-nav-favorites .erp-nav-row.active:hover {
  background: var(--nav-row-hover);
}
.erp-nav-favorites .erp-nav-row.active .ico {
  border: 0;
  background: transparent;
  color: var(--nav-accent);
}
.erp-nav-fav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-top: 3px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--nav-text-secondary);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}
.erp-nav-fav-toggle:hover {
  border-color: var(--nav-row-border);
  background: var(--nav-row-hover);
  color: var(--nav-text);
}

.erp-nav-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 1px 0;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.005em;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease,
    transform 100ms cubic-bezier(.23,1,.32,1);
}
.erp-nav-row:hover {
  border-color: var(--nav-row-border);
  background: var(--nav-row-hover);
  color: #fff;
  text-decoration: none;
}
.erp-nav-row.active {
  border-color: var(--nav-row-border);
  background: var(--nav-row-active);
  color: #fff;
  font-weight: 700;
  box-shadow:
    0 1px 2px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.10);
}
.erp-nav-row:active { transform: scale(.985); }

button.erp-nav-rowbtn.active {
  border-color: color-mix(in srgb, var(--nav-row-border) 58%, transparent);
  background: var(--nav-row-hover);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.065);
}
.erp-nav-row .ico {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--nav-icon-border);
  border-radius: 8px;
  background: var(--nav-icon-bg);
  color: var(--nav-icon-text);
  opacity: 1;
}
.erp-nav-row.active .ico {
  border-color: var(--nav-icon-active-border);
  background: var(--nav-icon-active-bg);
  color: #fff;
}
.erp-nav-label {
  min-width: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.erp-nav-row .chev {
  margin-left: auto;
  color: var(--nav-text-secondary);
  opacity: .78;
  transition: transform 160ms, opacity 120ms;
}
.erp-nav-row:hover .chev,
.erp-nav-row.open .chev { opacity: 1; }
.erp-nav-row.open .chev { transform: rotate(90deg); }

.erp-nav-sub {
  margin: 6px 1px 12px 36px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: var(--nav-sub-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}
.erp-nav-sub a {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 2px 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--nav-sub-text);
  font-size: 13.25px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration: none;
  text-wrap: pretty;
  touch-action: manipulation;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease,
    transform 100ms cubic-bezier(.23,1,.32,1);
}
.erp-nav-sub a:hover {
  border-color: var(--nav-row-border);
  background: var(--nav-row-hover);
  color: #fff;
  text-decoration: none;
}
.erp-nav-sub a.active {
  border-color: color-mix(in srgb, var(--nav-accent) 42%, var(--nav-row-border));
  background: var(--nav-row-active);
  color: #fff;
  font-weight: 650;
  box-shadow:
    0 1px 2px rgba(0,0,0,.10),
    0 4px 12px rgba(0,0,0,.045),
    inset 0 1px 0 rgba(255,255,255,.14);
}
.erp-nav-sub a:active { transform: scale(.985); }


.erp-nav-subgroup {
  min-width: 0;
  margin: 2px 0;
}
.erp-nav-subgroup-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--nav-sub-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease,
    transform 100ms cubic-bezier(.23,1,.32,1);
}
.erp-nav-subgroup-btn > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.erp-nav-subgroup-btn .chev {
  margin-left: auto;
  flex: 0 0 auto;
  color: currentColor;
  opacity: .72;
  transition: transform 160ms, opacity 120ms;
}
.erp-nav-subgroup-btn:hover {
  border-color: var(--nav-row-border);
  background: var(--nav-row-hover);
  color: var(--nav-text);
}
.erp-nav-subgroup-btn.open .chev {
  transform: rotate(90deg);
  opacity: 1;
}
.erp-nav-subgroup-btn.active {
  border-color: transparent;
  background: color-mix(in srgb, var(--nav-row-hover) 76%, transparent);
  color: var(--nav-text);
  box-shadow: none;
}
.erp-nav-subgroup-btn:active { transform: scale(.985); }
.erp-nav-subgroup-panel {
  margin: 4px 0 7px 10px;
  padding: 1px 0 1px 4px;
  border: 0;
}
.erp-nav-subgroup-panel a {
  padding-left: 11px;
  font-size: 12.9px;
}

.erp-sidebar-footer {
  margin: auto -8px 0;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11.5px; color: rgba(255,255,255,0.72); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.erp-sidebar-footer .live { width: 8px; height: 8px; border-radius: 999px; background: var(--success-500); box-shadow: 0 0 0 3px rgba(46,168,102,0.25); }


.erp-breadcrumb {
  height: 40px; padding: 0 24px; background: #fff;
  border-bottom: 1px solid var(--neutral-200);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.erp-breadcrumb .trail { display: flex; align-items: center; gap: 8px; color: var(--neutral-500); }
.erp-breadcrumb .trail .crumb { color: var(--neutral-500); text-decoration: none; }
.erp-breadcrumb .trail .crumb:last-child { color: var(--neutral-900); font-weight: 600; }
.erp-breadcrumb .trail .sep { color: var(--neutral-300); }
.erp-breadcrumb .right { display: flex; align-items: center; gap: 12px; color: var(--neutral-500); font-size: 12px; }

main.erp-main { flex: 1; min-width: 0; }

main.erp-main > .page { padding: 24px 24px 104px; }


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: var(--r-md);
  font-family: inherit; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}

.btn:focus-visible { outline: 2px solid var(--primary-700); outline-offset: 2px; box-shadow: 0 0 0 4px var(--primary-100); }
.btn-sm { height: 28px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-primary  { background: var(--primary-700); color: #fff; }
.btn-primary:hover  { background: var(--primary-800); color: #fff; }
.btn-primary:active { background: var(--primary-900); }
.btn-secondary { background: #fff; border-color: var(--neutral-400); color: var(--neutral-900); }
.btn-secondary:hover { background: var(--neutral-100); border-color: var(--neutral-500); color: var(--neutral-900); }
.btn-ghost { background: transparent; color: var(--primary-700); }
.btn-ghost:hover { background: var(--primary-50); color: var(--primary-700); }
.btn-danger  { background: var(--danger-500); color: #fff; }
.btn-danger:hover  { background: var(--danger-700); color: #fff; }
.btn-success { background: var(--success-700); color: #fff; }
.btn-success:hover { background: #0B4525; color: #fff; }
.btn[disabled], .btn.disabled, .btn[aria-disabled="true"] { background: var(--neutral-200); color: var(--neutral-500); cursor: not-allowed; border-color: transparent; }
.btn[disabled]:hover, .btn.disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--neutral-200) !important; color: var(--neutral-500) !important; border-color: transparent !important; }
.btn.disabled, .btn[aria-disabled="true"] { pointer-events: none; }


.input, .select, textarea.input {
  height: 36px; padding: 0 12px;
  border: 1px solid var(--neutral-300); border-radius: var(--r-md);
  background: #fff; color: var(--neutral-900); font-family: inherit; font-size: 14px;
  transition: border-color 120ms, box-shadow 120ms;
  width: 100%;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(37,99,176,0.15); }
.input::placeholder { color: var(--neutral-500); }
.input.input-num { text-align: right; font-variant-numeric: tabular-nums; }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--neutral-700); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.req::after { content: " *"; color: var(--danger-500); }


.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.badge-success { background: var(--success-100); color: var(--success-700); }
.badge-warning { background: var(--warning-100); color: var(--warning-700); }
.badge-danger  { background: var(--danger-100);  color: var(--danger-700); }
.badge-info    { background: var(--info-100);    color: var(--info-700); }
.badge-neutral { background: var(--neutral-100); color: var(--neutral-700); }
.badge-primary { background: var(--primary-100); color: var(--primary-700); }
.badge .dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; }


.card {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card-hd { padding: 14px 18px; border-bottom: 1px solid var(--neutral-200); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-hd > div:first-child { min-width: 0; }
.card-hd h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--neutral-900); letter-spacing: -0.005em; }
.card-hd .sub { font-size: 12px; color: var(--neutral-500); margin-top: 2px; }
.card-bd { padding: 16px 18px; }

.card > .card-body { padding: 16px 18px; }
.card > .card-body > h5:first-child,
.card > .card-body > h6:first-child {
  font-size: 15px; font-weight: 600; color: var(--neutral-900);
  letter-spacing: -0.005em; margin: 0 0 12px;
}


.chart-box { position: relative; width: 100%; height: 260px; }
.chart-box > canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.chart-box--sm { height: 200px; }
.chart-box--lg { height: 300px; }


.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl thead th {
  position: sticky; top: 0;
  background: var(--neutral-100); color: var(--neutral-700);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--neutral-300);
  z-index: 1;
}
.tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--neutral-200); vertical-align: middle; }
.tbl.zebra tbody tr:nth-child(even) td { background: var(--neutral-50); }
.tbl tbody tr:hover td { background: var(--primary-50); }
.tbl tbody tr.sel td { background: var(--primary-100); }
.tbl tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--primary-700); }
.tbl .num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .num-h { text-align: right; }
.tbl tfoot td { background: var(--neutral-100); font-weight: 600; border-top: 2px solid var(--neutral-300); padding: 10px 12px; }
.tbl-compact thead th, .tbl-compact tbody td { padding: 6px 10px; font-size: 12.5px; }


.dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; vertical-align: middle; }
.dot-g { background: var(--success-500); }
.dot-y { background: var(--warning-500); }
.dot-r { background: var(--danger-500); }
.dot-n { background: var(--neutral-400); }
.dot-pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 1.5s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,168,102,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(46,168,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,168,102,0); }
}

.score-bar { width: 80px; height: 6px; background: var(--neutral-200); border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; }
.score-bar > i { display: block; height: 100%; }


.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--neutral-200); background: #fff; padding: 0 16px; }
.tabs.tabs-card { border-radius: var(--r-lg) var(--r-lg) 0 0; border: 1px solid var(--neutral-200); border-bottom: 1px solid var(--neutral-200); }
.tab {
  height: 40px; padding: 0 16px; font-size: 13px; font-weight: 600;
  color: var(--neutral-700); background: transparent; border: 0; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.tab:hover { color: var(--neutral-900); text-decoration: none; }
.tab.active { color: var(--primary-700); border-bottom-color: var(--primary-700); }


.toolbar {
  position: sticky; top: 0; z-index: 5;
  height: 48px; padding: 0 14px;
  background: #fff; border-bottom: 1px solid var(--neutral-200);
  display: flex; align-items: center; gap: 8px;
}
.toolbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.toolbar .input, .toolbar .select { height: 32px; font-size: 13px; }


.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  background: var(--primary-50); color: var(--primary-700);
  border: 1px solid var(--primary-100); border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.chip .x { cursor: pointer; opacity: 0.6; }
.chip .x:hover { opacity: 1; }


.kpi {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 14px 16px; min-height: 130px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
  box-shadow: var(--elev-1);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.kpi:hover { box-shadow: var(--elev-2); transform: translateY(-1px); }
.kpi .accent { display: none; }  
.kpi .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--neutral-500); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 700; color: var(--neutral-900); line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi .sub { font-size: 12px; color: var(--neutral-500); }
.kpi .bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.kpi .delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.kpi .delta.up   { color: var(--success-700); }
.kpi .delta.down { color: var(--danger-700); }
.kpi svg.spark { display: block; }


.kpi-card {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--elev-1); padding: 13px 15px;
  display: flex; gap: 11px; align-items: center;
  position: relative; overflow: hidden;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.kpi-card:hover { box-shadow: var(--elev-2); transform: translateY(-1px); }
.kpi-card > .icon {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: var(--r-md);
  background: var(--primary-50); color: var(--primary-700);
  display: grid; place-items: center; font-size: 15px;
}
.kpi-card .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--neutral-500); font-weight: 600; margin: 0; }
.kpi-card .value { font-size: 19px; font-weight: 700; color: var(--neutral-900); line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; margin-top: 1px; }
.kpi-card .delta { font-size: 11.5px; margin-top: 2px; display: inline-flex; align-items: center; gap: 4px; }
.kpi-card.success > .icon { background: var(--success-50); color: var(--success-700); }
.kpi-card.warning > .icon { background: var(--warning-50); color: var(--warning-700); }
.kpi-card.danger  > .icon { background: var(--danger-50);  color: var(--danger-700); }

.tabular { font-variant-numeric: tabular-nums; }


.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.page-header .title { font-size: 22px; font-weight: 700; color: var(--neutral-900); margin: 0; letter-spacing: -0.015em; }
.page-header .subtitle { font-size: 13px; color: var(--neutral-500); margin-top: 4px; }
.page-header .actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }


.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-strip-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }


.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .row { display: grid; grid-template-columns: 70px 28px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--neutral-200); align-items: center; font-size: 13px; }
.timeline .row:last-child { border-bottom: 0; }
.timeline .h { font-family: var(--font-mono); color: var(--neutral-500); font-size: 12px; }
.timeline .ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--primary-50); color: var(--primary-700); }
.timeline .ico.ok { background: var(--success-50); color: var(--success-700); }
.timeline .ico.warn { background: var(--warning-50); color: var(--warning-700); }
.timeline .ico.danger { background: var(--danger-50); color: var(--danger-700); }

.timeline .row { margin: 0; }
.timeline .row > * { padding: 0; width: auto; max-width: none; }
.timeline .desc strong { font-weight: 600; }
.timeline .desc small { display: block; color: var(--neutral-500); font-size: 11.5px; margin-top: 2px; }


.divider { height: 1px; background: var(--neutral-200); }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px; background: var(--neutral-100); border: 1px solid var(--neutral-200); font-family: var(--font-mono); font-size: 11px; color: var(--neutral-700); }
.scroll-y { overflow-y: auto; }
.scroll-y::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll-y::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 999px; border: 2px solid var(--neutral-50); }
.scroll-y::-webkit-scrollbar-track { background: transparent; }


.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  height: 56px; padding: 0 22px; border-radius: 999px;
  background: var(--primary-700); color: #fff; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(26, 77, 140, 0.35), 0 2px 6px rgba(0,0,0,0.12);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.fab:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(26,77,140,0.45), 0 2px 6px rgba(0,0,0,0.12); }


.fab { opacity: .58; }
.fab:hover, .fab:focus-visible, .fab:active { opacity: 1; }
@media (hover: none) {
  
  .fab { opacity: .82; }
}
.fab .kbd { background: rgba(255,255,255,0.12); border: 0; color: rgba(255,255,255,0.9); margin-left: 4px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.25); border-radius: 0; }


.aging-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.aging-bars .bar { padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--neutral-200); }
.aging-bars .bar .lab { font-size: 11px; text-transform: uppercase; color: var(--neutral-500); font-weight: 600; letter-spacing: 0.06em; }
.aging-bars .bar .val { font-size: 18px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.aging-bars .bar.green  { background: var(--success-50);  border-color: var(--success-100); color: var(--success-700); }
.aging-bars .bar.yellow { background: var(--warning-50);  border-color: var(--warning-100); color: var(--warning-700); }
.aging-bars .bar.red    { background: var(--danger-50);   border-color: var(--danger-100);  color: var(--danger-700); }
.aging-bars .bar.dark   { background: #4A0E15; color: #fff; border-color: #4A0E15; }


.heatmap { display: grid; grid-template-columns: 24px repeat(12, 1fr); gap: 4px; }
.heatmap .lbl { font-size: 10px; color: var(--neutral-500); text-align: right; padding-right: 4px; line-height: 24px; }
.heatmap .cell { height: 24px; border-radius: 3px; background: var(--neutral-100); }
.heatmap .cell.l1 { background: #DCEBE0; }
.heatmap .cell.l2 { background: #B3D8BC; }
.heatmap .cell.l3 { background: #84BF93; }
.heatmap .cell.l4 { background: #4FA268; }
.heatmap .cell.l5 { background: var(--success-700); }


.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 24px;
}
.modal-dialog {
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-modal);
  max-width: 1240px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--neutral-200); display: flex; align-items: center; gap: 14px; }
.modal-header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.modal-body { flex: 1; overflow-y: auto; padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--neutral-200); display: flex; align-items: center; gap: 10px; justify-content: flex-end; background: var(--neutral-50); }


.stepper { display: flex; align-items: center; gap: 0; }
.stepper .step { display: flex; align-items: center; gap: 8px; }
.stepper .step .num {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--neutral-200); color: var(--neutral-500);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.stepper .step.active .num { background: var(--primary-700); color: #fff; }
.stepper .step.done .num   { background: var(--success-500); color: #fff; }
.stepper .step .lab { font-size: 12px; font-weight: 600; color: var(--neutral-500); }
.stepper .step.active .lab { color: var(--neutral-900); }
.stepper .conn { flex: 1; height: 2px; background: var(--neutral-200); margin: 0 12px; min-width: 40px; }
.stepper .step.done + .conn { background: var(--success-500); }


.pdf-doc {
  background: #fff; box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  width: 794px; min-height: 1123px;
  margin: 0 auto; padding: 32px 40px;
  font-family: var(--font-ui); color: #1A1F2C;
  position: relative;
}
.pdf-doc .brand-band { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--primary-700), var(--primary-500)); }
.pdf-doc .brand-band-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--primary-500), var(--primary-700)); }


.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.grid { display: grid; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--neutral-500); }
.text-success { color: var(--success-700); }
.text-warning { color: var(--warning-700); }
.text-danger  { color: var(--danger-700); }
.text-primary { color: var(--primary-700); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.w-full { width: 100%; }


.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
body.erp-no-scroll { overflow: hidden; }


.erp-hamburger {
  display: none;
  width: 44px; height: 44px; padding: 10px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-md);
  cursor: pointer; flex-direction: column; justify-content: space-between; align-items: stretch;
  margin-right: 4px;
}
.erp-hamburger span {
  display: block; height: 2px; width: 100%; background: var(--neutral-700); border-radius: 2px;
  transition: transform 180ms, opacity 180ms;
}
.erp-hamburger:hover { background: var(--neutral-100); }
.erp-hamburger:focus-visible { outline: 2px solid var(--primary-700); outline-offset: 2px; box-shadow: none; }


.erp-sidebar-backdrop {
  position: fixed; inset: 60px 0 0 0; background: rgba(15,23,42,0.45);
  backdrop-filter: blur(2px); z-index: 35;
  opacity: 0; transition: opacity 200ms;
}
.erp-sidebar-backdrop.is-show { opacity: 1; }


.erp-breadcrumb .trail { list-style: none; padding: 0; margin: 0; }
.erp-breadcrumb .trail li { display: inline-flex; align-items: center; }
.erp-breadcrumb .trail li.sep { padding: 0 4px; color: var(--neutral-300); }
.erp-breadcrumb .trail .crumb[aria-current="page"] { color: var(--neutral-900); font-weight: 600; }


button.erp-nav-row {
  appearance: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
button.erp-nav-row:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
  box-shadow: none;
}


.flash-stack {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 380px; pointer-events: none;
}
.flash-toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: #fff; color: var(--neutral-900);
  box-shadow: 0 10px 30px rgba(15,23,42,0.18), 0 2px 6px rgba(15,23,42,0.08);
  border-left: 4px solid var(--neutral-300);
  font-size: 13px; line-height: 1.4;
  animation: flashIn 240ms ease-out;
}
.flash-toast .flash-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 999px; background: var(--neutral-100); color: var(--neutral-700);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.flash-toast .flash-message { flex: 1; }
.flash-toast .flash-close {
  appearance: none; background: transparent; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--neutral-500); padding: 0 4px;
}
.flash-toast .flash-close:hover { color: var(--neutral-900); }
.flash-toast.is-leaving { opacity: 0; transform: translateX(20px); transition: opacity 200ms, transform 200ms; }

.flash-toast.flash-fijo { border-width: 2px; box-shadow: 0 8px 26px rgba(15, 23, 42, .16); }
.flash-toast .flash-nota {
  display: block; margin-top: 5px; font-size: 11px; line-height: 1.4;
  color: var(--neutral-500); font-weight: 500;
}

.flash-success { border-left-color: var(--success-500); }
.flash-success .flash-icon { background: rgba(46,168,102,0.15); color: var(--success-700); }
.flash-error   { border-left-color: var(--danger-500); }
.flash-error   .flash-icon { background: rgba(220,38,38,0.15); color: var(--danger-700); }
.flash-warning { border-left-color: var(--warning-500); }
.flash-warning .flash-icon { background: rgba(245,158,11,0.18); color: var(--warning-700); }

.flash-info    { border-left-color: var(--info-500); }
.flash-info    .flash-icon { background: var(--info-100); color: var(--info-700); }

@keyframes flashIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}


.modal-rp {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-rp[aria-hidden="false"] { display: flex; }
.modal-rp-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.55); backdrop-filter: blur(3px);
  cursor: pointer;
}
.modal-rp-content {
  position: relative; z-index: 1;
  background: #fff; border-radius: 12px; max-width: 460px; width: 100%;
  padding: 24px; box-shadow: 0 25px 60px rgba(15,23,42,0.35);
  animation: modalIn 220ms ease-out;
}
.modal-rp-content h2 { margin: 0 0 8px; font-size: 18px; color: var(--neutral-900); }
.modal-rp-body { color: var(--neutral-700); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.modal-rp-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal-rp-actions .btn-rp { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.modal-rp-actions .btn-rp.btn-cancel { background: #fff; border-color: var(--neutral-300); color: var(--neutral-700); }
.modal-rp-actions .btn-rp.btn-cancel:hover { background: var(--neutral-100); }
.modal-rp-actions .btn-rp.btn-danger { background: var(--danger-500); color: #fff; }
.modal-rp-actions .btn-rp.btn-danger:hover { background: var(--danger-700); color: #fff; }
.modal-rp-actions .btn-rp.btn-primary { background: var(--primary-700); color: #fff; }
.modal-rp-actions .btn-rp.btn-primary:hover { background: var(--primary-600); color: #fff; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}



.lbx { display: none; position: fixed; inset: 0; z-index: 9050; }
.lbx[aria-hidden="false"] { display: block; }
.lbx-fondo {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.85); backdrop-filter: blur(3px);
  cursor: zoom-out;
}

.lbx-escena {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none;
  cursor: zoom-out; 
}
.lbx-img {
  max-width: 88vw; max-height: 82vh;
  border-radius: 8px; background: #fff;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  user-select: none; -webkit-user-drag: none;
  transition: transform 140ms ease; will-change: transform;
  cursor: zoom-in; 
}
.lbx-img--arrastre { transition: none; }
.lbx-escena--pan .lbx-img { cursor: grab; }
.lbx-escena--pan .lbx-img:active { cursor: grabbing; }
.lbx-titulo {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono, ui-monospace, monospace); font-size: 14px; font-weight: 600;
  color: #fff; background: rgba(15,23,42,0.55);
  padding: 5px 12px; border-radius: 999px; pointer-events: none;
}
.lbx-cerrar {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.14); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lbx-cerrar:hover { background: rgba(255,255,255,0.3); }
.lbx-controles {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  background: rgba(15,23,42,0.7); border-radius: 999px; padding: 4px;
}
.lbx-controles button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: #fff;
  font-size: 19px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lbx-controles button:hover { background: rgba(255,255,255,0.18); }

.lbx-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(15,23,42,0.78); color: #fff;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}

@media (hover: hover) { .lbx-nav:hover { background: rgba(15,23,42,0.95); } }
.lbx-nav--anterior { left: 16px; }
.lbx-nav--siguiente { right: 16px; }

.lbx-contador {
  color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 0 12px 0 10px; margin-right: 2px; border-right: 1px solid rgba(255,255,255,0.22);
  pointer-events: none; white-space: nowrap;
}
.lbx-zoom {
  color: #fff; font-size: 13px; font-variant-numeric: tabular-nums;
  min-width: 52px; text-align: center; pointer-events: none;
}

.lbx-cerrar:focus-visible,
.lbx-nav:focus-visible,
.lbx-controles button:focus-visible {
  outline: 3px solid var(--primary-500); outline-offset: 2px;
}
.lbx-cargando {
  position: absolute; top: 50%; left: 50%; margin: -18px 0 0 -18px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff;
  animation: lbxGiro 0.8s linear infinite; pointer-events: none;
}
@keyframes lbxGiro { to { transform: rotate(360deg); } }
.lbx-error {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: #fff; font-size: 14px; text-align: center;
  background: rgba(15,23,42,0.55); padding: 10px 18px; border-radius: 8px;
  pointer-events: none;
}

.lbx-trigger {
  padding: 0; border: 0; background: transparent;
  display: block; cursor: zoom-in; border-radius: 6px;
}
.lbx-trigger:focus-visible { outline: 3px solid var(--primary-500); outline-offset: 2px; }
@media (max-width: 768px) {
  .lbx-img { max-width: 96vw; max-height: 76vh; }
  .lbx-controles { bottom: max(16px, env(safe-area-inset-bottom)); }
  .lbx-titulo { font-size: 12px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lbx-nav { width: 44px; height: 44px; }
  .lbx-nav--anterior { left: 6px; }
  .lbx-nav--siguiente { right: 6px; }
  
  .lbx-contador {
    position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    background: rgba(15,23,42,0.7); padding: 4px 12px; border-radius: 999px;
    border-right: 0; margin: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lbx-img { transition: none; }
  .lbx-cargando { animation-duration: 1.2s; }
}


.empty-state {
  text-align: center; padding: 48px 24px;
  background: #fff; border: 1px dashed var(--neutral-300); border-radius: var(--r-md);
  color: var(--neutral-700);
}
.empty-state .empty-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--neutral-100); color: var(--neutral-500);
  display: grid; place-items: center; font-size: 24px;
}
.empty-state h3 { margin: 0 0 6px; font-size: 16px; color: var(--neutral-900); }
.empty-state p { margin: 0 0 16px; font-size: 13px; color: var(--neutral-500); }


@media (max-width: 1099.98px) {
  .erp-hamburger { display: inline-flex; flex: 0 0 44px; }
  .erp-topbar { padding: 0 12px; gap: 10px; }
  .erp-topbar .brand { flex: 0 0 32px; min-width: 32px; }
  .erp-topbar .brand-text { display: none; }
  .erp-topbar .search-wrap { display: none; }
  .erp-topbar .top-action--static { display: none; }
  .erp-topbar .top-action span:not(.badge-red) { display: none; }
  .erp-topbar .top-action { padding: 0 8px; }
  .erp-topbar .user-info > div:not(.avatar) { display: none; }
  .erp-topbar .user-info {
    min-width: 44px;
    padding: 4px;
    margin-left: 0;
    justify-content: center;
  }

  .erp-sidebar {
    position: fixed; top: 60px; left: 0; bottom: 0;
    height: auto;
    width: min(88vw, 304px); z-index: 38;
    padding-inline: max(8px, env(safe-area-inset-left));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(.2,.8,.2,1);
    box-shadow: 2px 0 16px rgba(0,0,0,0.18);
  }
  .erp-sidebar.is-open { transform: translateX(0); }
  .erp-sidebar-search-slot {
    display: block;
    position: sticky;
    top: -8px;
    z-index: 4;
    margin: -8px -2px 3px;
    padding: 10px 2px 8px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-divider);
  }
  .erp-sidebar-search-slot .erp-global-search {
    display: block;
    width: 100%;
    max-width: none;
  }
  .erp-sidebar-search-slot .erp-global-search input {
    height: 44px;
    padding-right: 12px;
    background: #fff;
    font-size: 16px;
  }
  .erp-sidebar-search-slot .erp-global-search .kbd { display: none; }
  .erp-nav-favorites .erp-nav-row,
  .erp-nav-fav-toggle,
  .erp-sidebar .nav-section-edit { min-height: 44px; }
  .erp-layout { display: block; }
  main.erp-main > .page { padding: 16px 16px 92px; }
  .erp-breadcrumb { padding: 0 14px; }
  .erp-breadcrumb .right { display: none; }

  .fab { right: 14px; bottom: 14px; }
  
  .fab { width: 56px; padding: 0; justify-content: center; }
  .fab > span, .fab .kbd { display: none; }
  body.erp-no-scroll .fab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }
  .flash-stack { right: 12px; left: 12px; max-width: none; }
}


@media (min-width: 768px) and (max-width: 1199.98px) {
  .erp-topbar .top-action span:not(.badge-red) { display: none; }
  .erp-topbar .top-action {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 8px;
    justify-content: center;
  }
  .erp-topbar .user-info > div:not(.avatar) { display: none; }
  .erp-topbar .user-info {
    min-width: 44px;
    min-height: 44px;
    margin-left: 2px;
    padding: 4px;
    justify-content: center;
  }
  .erp-global-search { min-width: 0; }
}


.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link.visually-hidden-focusable:focus {
  position: absolute; top: 8px; left: 8px; z-index: 9999;
  background: var(--primary-700); color: #fff; padding: 8px 12px;
  border-radius: var(--r-md); text-decoration: none; font-weight: 600;
}
.top-action--static { cursor: default; }
.top-action--static:hover { background: transparent; }


@media (max-width: 768px) {
  body { overflow-x: hidden; }
}




@media (max-width: 768px) {
  .table-mobile-cards thead { display: none; }
  .table-mobile-cards tbody { display: block; }
  .table-mobile-cards tr {
    display: block;
    background: #fff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--r-lg);
    margin-bottom: 12px;
    padding: 12px 14px;
    box-shadow: var(--shadow-card);
  }
  .table-mobile-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: none;
    text-align: right;
  }
  .table-mobile-cards td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: left;
    flex-shrink: 0;
  }
  
  .table-mobile-cards td[data-label=""],
  .table-mobile-cards td.action-cell {
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid var(--neutral-100);
    margin-top: 6px;
  }
  .table-mobile-cards td[data-label=""]::before,
  .table-mobile-cards td.action-cell::before { content: none; }
  
  .table-mobile-cards td.action-cell .btn,
  .table-mobile-cards td.action-cell a {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
  }
}


.btn-pick-action {
  min-height: 44px;
  min-width: 96px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
}
.btn-pick-action--pick {
  background: var(--success-700);
  border: 1px solid var(--success-700);
  color: #fff;
}
.btn-pick-action--pick:hover { background: #0B4525; color: #fff; }
.btn-pick-action--quiebre {
  background: #fff;
  border: 1px solid var(--danger-700);
  color: var(--danger-700);
}
.btn-pick-action--quiebre:hover { background: var(--danger-700); color: #fff; }

.pick-actions {
  display: flex;
  gap: 12px;          
  align-items: stretch;
  flex-wrap: wrap;
}
.pick-actions .form-control {
  min-height: 44px;
  font-size: 16px;     
  text-align: center;
  font-weight: 600;
}




:where(a, button, [tabindex], .tab, .top-action, .erp-nav-row, .erp-nav-rowbtn,
       .erp-nav-subgroup-btn, .erp-nav-sub a, .erp-nav-fav-toggle,
       .fab, .chip .x, .flash-close, .crumb):focus-visible {
  outline: 2px solid var(--primary-700);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

:where(.erp-nav-row, .erp-nav-rowbtn, .erp-nav-subgroup-btn, .erp-nav-sub a,
       .erp-nav-fav-toggle, .nav-section-edit):focus-visible { outline-color: #fff; }

main.erp-main:focus { outline: none; }


.erp-nav-sub a { color: var(--nav-sub-text, rgba(255, 255, 255, 0.78)); }


@media (max-width: 767.98px) {
  .erp-topbar .top-action { min-width: 44px; min-height: 44px; justify-content: center; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .dot-pulse { animation: none !important; }
  .erp-nav-row:active,
  .erp-nav-sub a:active,
  .erp-nav-subgroup-btn:active { transform: none; }
}




.alert { border-radius: var(--r-md); border: 1px solid transparent; padding: 12px 14px; font-size: 13.5px; }
.alert-success { background: var(--success-50); border-color: var(--success-100); color: var(--success-700); }
.alert-warning { background: var(--warning-50); border-color: var(--warning-100); color: var(--warning-700); }
.alert-danger  { background: var(--danger-50);  border-color: var(--danger-100);  color: var(--danger-700); }

.alert-info    { background: var(--info-100);   border-color: var(--info-100);   color: var(--info-700); }
.alert-primary { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-700); }
.alert-secondary { background: var(--neutral-50); border-color: var(--neutral-200); color: var(--neutral-700); }


.nav-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--neutral-200); }
.nav-tabs .nav-link { display: inline-flex; align-items: center; gap: 7px; color: var(--neutral-500); font-size: 13.5px; font-weight: 600; line-height: 1; border: 0; border-bottom: 2px solid transparent; border-radius: var(--r-md) var(--r-md) 0 0; padding: 10px 15px; margin-bottom: -1px; background: none; cursor: pointer; transition: color .12s, background .12s, border-color .12s; }
.nav-tabs .nav-link svg { opacity: .6; transition: opacity .12s; }
.nav-tabs .nav-link:hover { color: var(--neutral-900); background: var(--neutral-50); }
.nav-tabs .nav-link:hover svg { opacity: 1; }
.nav-tabs .nav-link.active { color: var(--primary-700); background: none; border-bottom-color: var(--primary-700); }
.nav-tabs .nav-link.active svg { opacity: 1; }


.erp-main :is(.nav-tabs, .tabs, .admin-subnav, .plan-tabs, .pm-tabs, .fc-tabs) {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--neutral-100);
  list-style: none;
  scrollbar-width: thin;
}

.erp-main :is(.nav-tabs, .tabs, .admin-subnav, .plan-tabs, .pm-tabs, .fc-tabs)
  :is(.nav-item, .nav-link, .tab, .admin-tab, .plan-tab, .pm-tab, button, a) {
  flex: 0 0 auto;
}

.erp-main :is(.nav-tabs, .tabs, .admin-subnav, .plan-tabs, .pm-tabs, .fc-tabs)
  :is(.nav-link, .tab, .admin-tab, .plan-tab, .pm-tab, button) {
  min-height: 38px;
  margin: 0;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--neutral-600);
  line-height: 1.15;
  white-space: nowrap;
}

.erp-main :is(.nav-tabs, .tabs, .admin-subnav, .plan-tabs, .pm-tabs, .fc-tabs)
  :is(.nav-link, .tab, .admin-tab, .plan-tab, .pm-tab, button):hover {
  border-color: var(--neutral-200);
  background: rgba(255, 255, 255, .62);
  color: var(--neutral-900);
  text-decoration: none;
}

.erp-main :is(.nav-tabs, .tabs, .admin-subnav, .plan-tabs, .pm-tabs, .fc-tabs)
  :is(.nav-link.active, .tab.active, .admin-tab.on, .plan-tab.is-active, .pm-tab.active, button.active) {
  border-color: var(--neutral-200);
  border-bottom-color: var(--neutral-200);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .10);
  color: var(--primary-700);
  font-weight: 650;
}

.erp-main :is(.nav-tabs, .tabs, .admin-subnav, .plan-tabs, .pm-tabs, .fc-tabs)
  :is(.nav-link, .tab, .admin-tab, .plan-tab, .pm-tab, button):focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--primary-700);
  outline-offset: 1px;
}


.tab-content { min-height: 220px; }


.btn-outline-primary { border: 1px solid var(--primary-600); color: var(--primary-700); background: #fff; }
.btn-outline-primary:hover { background: var(--primary-700); border-color: var(--primary-700); color: #fff; }
.btn-outline-secondary { border: 1px solid var(--neutral-300); color: var(--neutral-700); background: #fff; }
.btn-outline-secondary:hover { background: var(--neutral-100); color: var(--neutral-900); border-color: var(--neutral-300); }


.form-control, .form-select { border: 1px solid var(--neutral-300); border-radius: var(--r-md); font-size: 14px; color: var(--neutral-900); }
.form-control:focus, .form-select:focus { border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(37,99,176,0.15); }
.form-control-sm, .form-select-sm { font-size: 13px; }



.badge.bg-success   { background-color: var(--success-100) !important; color: var(--success-700) !important; }
.badge.bg-danger    { background-color: var(--danger-100)  !important; color: var(--danger-700)  !important; }
.badge.bg-warning   { background-color: var(--warning-100) !important; color: var(--warning-700) !important; }
.badge.bg-primary   { background-color: var(--primary-100) !important; color: var(--primary-700) !important; }
.badge.bg-secondary { background-color: var(--neutral-100) !important; color: var(--neutral-700) !important; }
.badge.bg-info      { background-color: var(--info-100)    !important; color: var(--info-700)    !important; }
.badge.bg-dark      { background-color: var(--neutral-900) !important; color: #fff !important; }


.table > thead th { background: var(--neutral-100); color: var(--neutral-700); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 2px solid var(--neutral-300); font-weight: 700; }
.table > tbody td, .table > tbody th { border-color: var(--neutral-200); }
.table-hover > tbody > tr:hover > * { background-color: var(--primary-50); }


.progress { background: var(--neutral-200); border-radius: 999px; height: 8px; }
.progress-bar { background-color: var(--primary-600); }


.display-4, .display-5, .display-6 { font-weight: 700; letter-spacing: -0.01em; color: var(--neutral-900); font-variant-numeric: tabular-nums; }
.display-6 { font-size: 1.6rem; }
.display-5 { font-size: 2rem; }




.table-erp { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }

.card .table-erp { background: transparent; border: 0; border-radius: 0; box-shadow: none; }


@media (hover: none) { .listing-row-actions { opacity: 1 !important; } }


.doc-det-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.doc-det-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 120px; align-self: flex-start; }
@media (max-width: 900px) {
  .doc-det-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-det-side { position: static; }
}


@media (max-width: 768px) {
  .tbl-tarjetas, .tbl-tarjetas tbody, .tbl-tarjetas tfoot,
  .tbl-tarjetas tr, .tbl-tarjetas td { display: block; }
  .tbl-tarjetas thead { display: none; }
  .tbl-tarjetas { width: 100%; }

  .tbl-tarjetas tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 9px 12px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 12px 14px;
    margin: 0 12px 10px;
  }
  .tbl-tarjetas tbody td { padding: 0; border: 0; height: auto; }

  
  .tbl-tarjetas tbody td:nth-child(1),
  .tbl-tarjetas tbody td:nth-child(2),
  .tbl-tarjetas tbody td:last-child { grid-column: 1 / -1; }

  .tbl-tarjetas tbody td:nth-child(2) {
    font-weight: 600; line-height: 1.35;
    padding-bottom: 9px; border-bottom: 1px solid var(--neutral-100);
  }

  
  .tbl-tarjetas tbody td:nth-child(n+3):not(:last-child) {
    display: flex; flex-direction: column; gap: 3px; text-align: left;
    font-size: 14px;
  }
  .tbl-tarjetas tbody td:nth-child(n+3):not(:last-child)::before,
  .tbl-tarjetas tbody td:last-child::before {
    content: attr(data-label);
    font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--neutral-500);
  }

  .tbl-tarjetas tbody td:last-child {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    border-top: 1px solid var(--neutral-200); padding-top: 10px;
    font-size: 16px; font-weight: 700; text-align: right;
  }

  .tbl-tarjetas tfoot tr { display: flex; justify-content: space-between; gap: 12px; padding: 0 14px; }
  .tbl-tarjetas tbody td:empty { display: none; }
}

@media (max-width: 767.98px) {
  
  .kpi-card > div:not(.icon) { min-width: 0; }
  .kpi-card .value { overflow-wrap: anywhere; }
  
  .kpi { min-width: 0; }
  .kpi .value { font-size: 21px; overflow-wrap: anywhere; }

  
  .kpi-strip, .kpi-strip-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aging-bars { grid-template-columns: repeat(2, 1fr); }

  
  .card .tbl:not(.table-mobile-cards):not(.tbl-tarjetas), .card-bd .tbl:not(.table-mobile-cards):not(.tbl-tarjetas),
  .card .table:not(.table-mobile-cards):not(.tbl-tarjetas), .card-bd .table:not(.table-mobile-cards):not(.tbl-tarjetas) {
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
    
    background:
      linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat,
      linear-gradient(to left,  #fff 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat,
      linear-gradient(to right, rgba(15,23,42,.10), rgba(15,23,42,0)) left center / 10px 100% no-repeat,
      linear-gradient(to left,  rgba(15,23,42,.10), rgba(15,23,42,0)) right center / 10px 100% no-repeat;
    background-attachment: local, local, scroll, scroll;
  }

  
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header .actions { flex-wrap: wrap; }
  
  .page-header .actions form { flex-wrap: wrap; }
  .toolbar { height: auto; flex-wrap: wrap; padding: 8px 14px; }
  .toolbar .input, .toolbar .select { flex: 1 1 140px; }
}


@media (min-width: 768px) and (max-width: 991.98px) {
  .kpi-strip-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


.hub-kpi {
  flex: 1; min-width: 150px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-1);
  padding: 15px 17px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.hub-kpi:hover { box-shadow: var(--elev-2); transform: translateY(-1px); }

.hub-tile {
  display: flex; flex-direction: column; gap: 7px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-1);
  text-decoration: none; color: inherit;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.hub-tile:hover { transform: translateY(-2px); box-shadow: var(--elev-2); border-color: var(--primary-100); }
.hub-tile:focus-visible { outline: 2px solid var(--primary-700); outline-offset: 2px; box-shadow: var(--elev-2); border-color: var(--primary-500); }
.hub-tile:active { transform: translateY(0); box-shadow: var(--elev-1); }
.hub-tile__ico {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: var(--r-md);
  background: var(--primary-50); color: var(--primary-700);
  display: grid; place-items: center;
}
.hub-tile--primary {
  border-color: var(--primary-100);
  background: linear-gradient(180deg, #fff 0%, var(--primary-50) 100%);
}
.hub-tile--primary .hub-tile__ico { background: var(--primary-600); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hub-kpi, .hub-tile { transition: none; }
  .hub-kpi:hover, .hub-tile:hover { transform: none; }
}


#apariencia { scroll-margin-top: 76px; }
.theme-settings-card { overflow: hidden; }
.theme-settings-card > .card-body { padding: 20px; }
.theme-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.theme-settings-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--primary-700);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.theme-settings-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--neutral-900);
  font-size: 19px;
  letter-spacing: -.015em;
}
.theme-settings-head p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--neutral-500);
  font-size: 13.5px;
  line-height: 1.45;
  text-wrap: pretty;
}
.theme-current {
  flex: 0 0 auto;
  min-width: 170px;
  padding: 10px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--neutral-50);
}
.theme-current span {
  display: block;
  color: var(--neutral-500);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.theme-current strong {
  display: block;
  margin-top: 2px;
  color: var(--neutral-900);
  font-size: 13.5px;
}
.theme-picker { display: grid; gap: 20px; }
.theme-family {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.theme-family legend {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--neutral-900);
  font-size: 13.5px;
  font-weight: 700;
}
.theme-family > p {
  margin: 2px 0 9px;
  color: var(--neutral-500);
  font-size: 12px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.theme-family--inherit .theme-options {
  grid-template-columns: minmax(215px, 320px);
}
.theme-option {
  display: block;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}
.theme-option__surface {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 13px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--elev-1);
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
}
.theme-option:hover .theme-option__surface {
  border-color: var(--neutral-300);
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
}
.theme-option__input:focus-visible + .theme-option__surface {
  outline: 3px solid var(--primary-600);
  outline-offset: 2px;
}
.theme-option__input:checked + .theme-option__surface {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 1px var(--primary-600), var(--elev-2);
}
.theme-option__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.theme-option__heading > span:first-child { min-width: 0; }
.theme-option__heading strong {
  display: block;
  color: var(--neutral-900);
  font-size: 13px;
  line-height: 1.25;
}
.theme-option__heading small {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: var(--neutral-500);
  font-size: 11.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.theme-option__check {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--neutral-100);
  color: transparent;
}
.theme-option__input:checked + .theme-option__surface .theme-option__check {
  background: var(--primary-600);
  color: #fff;
}
.theme-option__preview {
  min-height: 68px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--preview-canvas);
}
.theme-option__rail {
  width: 36%;
  flex: 0 0 36%;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 9px 7px;
  background: var(--preview-nav);
}
.theme-option__rail i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: var(--preview-canvas);
  opacity: .76;
}
.theme-option__rail i:nth-child(2) {
  width: 80%;
  background: var(--preview-accent);
  opacity: 1;
}
.theme-option__rail i:nth-child(3) { width: 64%; }
.theme-option__canvas {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-content: center;
  padding: 9px;
  background: var(--preview-canvas);
}
.theme-option__canvas b {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  border-radius: 3px;
  background: var(--preview-accent);
}
.theme-option__canvas i {
  display: block;
  height: 24px;
  border: 1px solid var(--preview-soft);
  border-radius: 4px;
  background: var(--preview-soft);
}


.theme-option__surface--office .theme-option__preview {
  border-radius: 3px;
  border-color: #B9C9D8;
}
.theme-option__surface--office .theme-option__rail {
  width: 29%;
  flex-basis: 29%;
  border-right: 1px solid #B9C9D8;
}
.theme-option__surface--office .theme-option__rail i {
  height: 4px;
  background: #385978;
}
.theme-option__surface--office .theme-option__canvas {
  gap: 5px;
}
.theme-option__surface--office .theme-option__canvas b {
  height: 5px;
  border-radius: 1px;
}
.theme-option__surface--office .theme-option__canvas i {
  border-radius: 2px;
}
.theme-option__surface--grafito .theme-option__preview {
  border-radius: 5px;
  border-color: #AEB8C5;
}
.theme-option__surface--grafito .theme-option__rail {
  width: 42%;
  flex-basis: 42%;
}
.theme-option__surface--grafito .theme-option__canvas {
  grid-template-columns: 1fr;
}
.theme-option__surface--grafito .theme-option__canvas b {
  height: 7px;
}
.theme-option__surface--grafito .theme-option__canvas i {
  height: 15px;
  border-radius: 2px;
}
.theme-option__surface--esmeralda .theme-option__preview {
  border-radius: 10px;
}
.theme-option__surface--esmeralda .theme-option__rail {
  width: 34%;
  flex-basis: 34%;
}
.theme-option__surface--esmeralda .theme-option__canvas {
  padding: 10px;
}
.theme-option__surface--esmeralda .theme-option__canvas b {
  width: 76%;
  border-radius: 999px;
}
.theme-option__surface--esmeralda .theme-option__canvas i {
  border-radius: 6px;
}
.theme-option__surface--alto_contraste .theme-option__preview {
  border: 2px solid #071525;
  border-radius: 4px;
}
.theme-option__surface--alto_contraste .theme-option__rail {
  width: 32%;
  flex-basis: 32%;
}
.theme-option__surface--alto_contraste .theme-option__rail i {
  height: 6px;
}
.theme-option__surface--alto_contraste .theme-option__rail i:nth-child(2) {
  background: #67E8F9;
}
.theme-option__surface--alto_contraste .theme-option__canvas b,
.theme-option__surface--alto_contraste .theme-option__canvas i {
  border-radius: 1px;
}
.theme-option__surface--alto_contraste .theme-option__canvas i {
  border: 2px solid #0067C5;
  background: #E7F8FB;
}
.theme-option__surface--pastel .theme-option__preview {
  border-radius: 14px;
  border-color: #CFC5E2;
}
.theme-option__surface--pastel .theme-option__rail {
  width: 30%;
  flex-basis: 30%;
  border-right: 1px solid #CFC5E2;
}
.theme-option__surface--pastel .theme-option__rail i {
  background: #554870;
}
.theme-option__surface--pastel .theme-option__canvas b {
  width: 72%;
  border-radius: 999px;
}
.theme-option__surface--pastel .theme-option__canvas i {
  border-radius: 9px;
}
.theme-option__surface--rojo .theme-option__preview {
  border-radius: 6px;
  border-color: #CFA4AA;
}
.theme-option__surface--rojo .theme-option__rail {
  width: 38%;
  flex-basis: 38%;
}
.theme-option__surface--rojo .theme-option__rail i {
  height: 5px;
}
.theme-option__surface--rojo .theme-option__rail i:nth-child(2) {
  width: 62%;
  background: #FF8D9B;
}
.theme-option__surface--rojo .theme-option__canvas {
  grid-template-columns: 1fr;
}
.theme-option__surface--rojo .theme-option__canvas b {
  width: 84%;
  height: 7px;
  border-radius: 2px;
}
.theme-option__surface--rojo .theme-option__canvas i {
  height: 14px;
  border-radius: 3px;
}
.theme-option__surface--naranja .theme-option__preview {
  border-radius: 10px;
  border-color: #D9B991;
}
.theme-option__surface--naranja .theme-option__rail {
  width: 31%;
  flex-basis: 31%;
  border-right: 1px solid #D9B991;
}
.theme-option__surface--naranja .theme-option__rail i {
  height: 4px;
  background: #684129;
}
.theme-option__surface--naranja .theme-option__rail i:nth-child(2) {
  width: 74%;
  background: #B95000;
}
.theme-option__surface--naranja .theme-option__canvas b {
  width: 68%;
  border-radius: 999px;
}
.theme-option__surface--naranja .theme-option__canvas i {
  border-color: #E2C49F;
  border-radius: 7px;
}
.theme-preview-status {
  min-height: 20px;
  margin: -7px 0 0;
  color: var(--neutral-500);
  font-size: 12px;
}
.theme-settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--neutral-200);
}
.theme-settings-actions > span {
  color: var(--neutral-500);
  font-size: 12px;
}

@media (max-width: 767.98px) {
  .theme-settings-card > .card-body { padding: 16px; }
  .theme-settings-head { display: grid; gap: 12px; }
  .theme-current { width: 100%; min-width: 0; }
  .theme-options,
  .theme-family--inherit .theme-options { grid-template-columns: 1fr; }
  .theme-settings-actions { align-items: stretch; flex-direction: column; }
  .theme-settings-actions .btn { width: 100%; }
}


html[data-theme='grafito'] {
  --primary-900:#171D26; --primary-800:#202733; --primary-700:#374151; --primary-600:#526071;
  --primary-500:#667487; --primary-100:#D8DEE7; --primary-50:#EEF1F5;
  --neutral-100:#E9EDF2; --neutral-50:#F5F7F9; --neutral-200:#D3D9E2;
  --hairline:#C9D0DA;
  --r-sm:3px; --r-md:4px; --r-lg:6px; --r-xl:8px;
  --elev-1:0 1px 2px rgba(10,15,22,.05);
  --elev-2:0 1px 2px rgba(10,15,22,.06), 0 3px 8px rgba(10,15,22,.06);
}
html[data-theme='grafito'] .erp-sidebar {
  --nav-bg:#202733;
  --nav-text:#F7F9FC;
  --nav-text-secondary:#CBD3DE;
  --nav-section-text:#AEB9C8;
  --nav-divider:rgba(220,227,236,.17);
  --nav-row-hover:rgba(255,255,255,.07);
  --nav-row-active:rgba(255,255,255,.12);
  --nav-row-border:rgba(222,229,238,.18);
  --nav-icon-bg:rgba(4,8,13,.20);
  --nav-icon-border:rgba(220,227,236,.20);
  --nav-icon-text:#DCE3EC;
  --nav-icon-active-bg:rgba(173,190,211,.17);
  --nav-icon-active-border:rgba(190,204,222,.56);
  --nav-sub-bg:rgba(3,7,12,.15);
  --nav-sub-text:#D2D9E3;
  --nav-accent:#B9C8DA;
}
html[data-theme='grafito'] .erp-topbar {
  background:#F8FAFC;
}
html[data-theme='office'] {
  --primary-900:#08345A; --primary-800:#0B4F86; --primary-700:#0D5E9E; --primary-600:#0F6CBD;
  --primary-500:#2886D8; --primary-100:#DDECF9; --primary-50:#F2F7FC;
  --neutral-100:#EDF2F6; --neutral-50:#F7F9FB; --neutral-200:#D8E0E8;
  --hairline:#CCD7E1;
  --r-sm:2px; --r-md:4px; --r-lg:6px; --r-xl:8px;
  --elev-1:0 1px 2px rgba(20,55,85,.04);
  --elev-2:0 1px 2px rgba(20,55,85,.05), 0 3px 9px rgba(20,55,85,.05);
}
html[data-theme='office'] .erp-sidebar {
  --nav-bg:#F2F6FA;
  --nav-text:#172D45;
  --nav-text-secondary:#385169;
  --nav-section-text:#4B6278;
  --nav-divider:rgba(41,77,107,.19);
  --nav-row-hover:#E5EEF6;
  --nav-row-active:#DDECF9;
  --nav-row-border:#A9C8E2;
  --nav-icon-bg:#FFFFFF;
  --nav-icon-border:#B8CBDC;
  --nav-icon-text:#315B7E;
  --nav-icon-active-bg:#FFFFFF;
  --nav-icon-active-border:#69A6D7;
  --nav-sub-bg:#EAF1F7;
  --nav-sub-text:#294760;
  --nav-accent:#0F6CBD;
  box-shadow:inset -1px 0 0 #C9D7E3;
}
html[data-theme='office'] .erp-sidebar .nav-section-edit:hover {
  color:#173B5B;
  background:#E3ECF4;
}
html[data-theme='esmeralda'] {
  --primary-900:#073B35; --primary-800:#0A4A40; --primary-700:#0B6956; --primary-600:#12806A;
  --primary-500:#25977D; --primary-100:#D7ECE5; --primary-50:#EFF7F4;
  --neutral-100:#EEF3F0; --neutral-50:#F8FAF8; --neutral-200:#DCE4E0;
  --hairline:#D5DFDA;
  --r-sm:5px; --r-md:7px; --r-lg:10px; --r-xl:13px;
}
html[data-theme='esmeralda'] .erp-sidebar {
  --nav-bg: #073B35;
  --nav-text: #F2FAF7;
  --nav-text-secondary: #C5DAD3;
  --nav-section-text: #B9D3CA;
  --nav-divider: rgba(190,222,211,.24);
  --nav-row-hover: rgba(255,255,255,.085);
  --nav-row-active: rgba(255,255,255,.145);
  --nav-row-border: rgba(185,228,213,.22);
  --nav-icon-bg: rgba(0,23,20,.22);
  --nav-icon-border: rgba(171,221,204,.24);
  --nav-icon-text: #D2F2E7;
  --nav-icon-active-bg: rgba(126,226,189,.18);
  --nav-icon-active-border: rgba(126,226,189,.55);
  --nav-sub-bg: rgba(0,19,16,.14);
  --nav-sub-text: #D3E6DF;
  --nav-accent: #7EE2BD;
}
html[data-theme='pastel'] {
  --primary-900:#302A45; --primary-800:#463D63; --primary-700:#554870; --primary-600:#66558F;
  --primary-500:#806FA7; --primary-100:#E3DDF0; --primary-50:#F6F2FA;
  --neutral-100:#F2EEF6; --neutral-50:#FAF7FC; --neutral-200:#DFD8E8;
  --hairline:#D7CFE2;
  --r-sm:6px; --r-md:10px; --r-lg:14px; --r-xl:18px;
  --elev-1:0 1px 3px rgba(68,54,94,.05);
  --elev-2:0 2px 5px rgba(68,54,94,.06), 0 7px 18px rgba(68,54,94,.06);
}
html[data-theme='pastel'] .erp-sidebar {
  --nav-bg:#EEEAF7;
  --nav-text:#302A45;
  --nav-text-secondary:#514867;
  --nav-section-text:#625873;
  --nav-divider:rgba(76,61,104,.19);
  --nav-row-hover:#E3DDED;
  --nav-row-active:#DDD5EA;
  --nav-row-border:#BAAFD0;
  --nav-icon-bg:#F9F7FC;
  --nav-icon-border:#C9BFE0;
  --nav-icon-text:#554870;
  --nav-icon-active-bg:#FFFFFF;
  --nav-icon-active-border:#8E7CAF;
  --nav-sub-bg:#E8E2F1;
  --nav-sub-text:#443B58;
  --nav-accent:#66558F;
  box-shadow:inset -1px 0 0 #CEC4DD;
}
html[data-theme='pastel'] .erp-sidebar .nav-section-edit:hover {
  color:#302A45;
  background:#E1DAEB;
}
html[data-theme='rojo'] {
  --primary-900:#471016; --primary-800:#641722; --primary-700:#8F1D2C; --primary-600:#B42336;
  --primary-500:#D23A4B; --primary-100:#F4D9DC; --primary-50:#FCF1F2;
  --neutral-100:#F3EEEE; --neutral-50:#FAF7F7; --neutral-200:#E3D8DA;
  --hairline:#DACBCD;
  --r-sm:3px; --r-md:5px; --r-lg:7px; --r-xl:9px;
  --elev-1:0 1px 2px rgba(71,16,22,.05);
  --elev-2:0 2px 5px rgba(71,16,22,.07), 0 5px 12px rgba(71,16,22,.05);
}
html[data-theme='rojo'] .erp-sidebar {
  --nav-bg:#641722;
  --nav-text:#FFF7F7;
  --nav-text-secondary:#F1CCD1;
  --nav-section-text:#E9BDC3;
  --nav-divider:rgba(255,224,228,.22);
  --nav-row-hover:rgba(255,255,255,.08);
  --nav-row-active:rgba(255,255,255,.14);
  --nav-row-border:rgba(255,210,216,.25);
  --nav-icon-bg:rgba(45,5,11,.21);
  --nav-icon-border:rgba(255,216,221,.25);
  --nav-icon-text:#FFE5E8;
  --nav-icon-active-bg:rgba(255,142,155,.17);
  --nav-icon-active-border:rgba(255,152,165,.58);
  --nav-sub-bg:rgba(45,5,11,.16);
  --nav-sub-text:#F6D9DD;
  --nav-accent:#FF98A5;
}
html[data-theme='naranja'] {
  --primary-900:#5A2500; --primary-800:#7A3100; --primary-700:#973D00; --primary-600:#B95000;
  --primary-500:#D86A13; --primary-100:#F1D5B3; --primary-50:#FFF4E8;
  --neutral-100:#F4EFE8; --neutral-50:#FBF8F4; --neutral-200:#E4DACE;
  --hairline:#DACDBE;
  --r-sm:4px; --r-md:6px; --r-lg:9px; --r-xl:12px;
  --elev-1:0 1px 2px rgba(90,37,0,.04);
  --elev-2:0 2px 5px rgba(90,37,0,.06), 0 5px 12px rgba(90,37,0,.04);
}
html[data-theme='naranja'] .erp-sidebar {
  --nav-bg:#FFF2E0;
  --nav-text:#3B2718;
  --nav-text-secondary:#66452E;
  --nav-section-text:#725039;
  --nav-divider:rgba(109,67,33,.21);
  --nav-row-hover:#F7E4CC;
  --nav-row-active:#F1D5B3;
  --nav-row-border:#D6A976;
  --nav-icon-bg:#FFFCF7;
  --nav-icon-border:#D9B58D;
  --nav-icon-text:#77411E;
  --nav-icon-active-bg:#FFFFFF;
  --nav-icon-active-border:#C77636;
  --nav-sub-bg:#FAE8D1;
  --nav-sub-text:#513622;
  --nav-accent:#B95000;
  box-shadow:inset -1px 0 0 #DCC7AD;
}
html[data-theme='naranja'] .erp-sidebar .nav-section-edit:hover {
  color:#3B2718;
  background:#F5DFC5;
}
html[data-theme='office'] .erp-sidebar :is(
  .erp-nav-row:hover,
  .erp-nav-row.active,
  .erp-nav-sub a:hover,
  .erp-nav-sub a.active
),
html[data-theme='pastel'] .erp-sidebar :is(
  .erp-nav-row:hover,
  .erp-nav-row.active,
  .erp-nav-sub a:hover,
  .erp-nav-sub a.active
),
html[data-theme='naranja'] .erp-sidebar :is(
  .erp-nav-row:hover,
  .erp-nav-row.active,
  .erp-nav-sub a:hover,
  .erp-nav-sub a.active
) {
  color:var(--nav-text);
}
html[data-theme='office'] .erp-sidebar .erp-nav-row.active .ico,
html[data-theme='pastel'] .erp-sidebar .erp-nav-row.active .ico,
html[data-theme='naranja'] .erp-sidebar .erp-nav-row.active .ico {
  color:var(--nav-icon-text);
}
html[data-theme='alto_contraste'] {
  color-scheme: light;
  --primary-900:#071525; --primary-800:#09213A; --primary-700:#004E98; --primary-600:#0067C5;
  --primary-500:#087DDF; --primary-100:#C7F3FA; --primary-50:#EAFBFD;
  --neutral-900:#07111F; --neutral-800:#111D2C; --neutral-700:#243245; --neutral-600:#344358;
  --neutral-500:#44546A; --neutral-400:#596A80; --neutral-300:#8997A8; --neutral-200:#B5BFCC;
  --neutral-100:#EEF1F4; --neutral-50:#FFFFFF;
  --hairline:#8997A8;
  --r-sm:2px; --r-md:4px; --r-lg:6px; --r-xl:8px;
  --elev-1:none; --elev-2:none; --shadow-card:none;
}
html[data-theme='alto_contraste'] .erp-sidebar {
  --nav-bg:#071525;
  --nav-text:#FFFFFF;
  --nav-text-secondary:#E6EEF8;
  --nav-section-text:#D7E3F0;
  --nav-divider:rgba(255,255,255,.48);
  --nav-row-hover:#122A45;
  --nav-row-active:#173753;
  --nav-row-border:#85A5C4;
  --nav-icon-bg:#0C2036;
  --nav-icon-border:#A9C0D6;
  --nav-icon-text:#FFFFFF;
  --nav-icon-active-bg:#123451;
  --nav-icon-active-border:#67E8F9;
  --nav-sub-bg:#0B1E33;
  --nav-sub-text:#FFFFFF;
  --nav-accent:#67E8F9;
}
html[data-theme='alto_contraste'] :is(
  .erp-nav-row.active,
  .erp-nav-sub a.active
) {
  border-color: #9ABAD6;
  box-shadow: inset 0 0 0 1px #9ABAD6;
}
html[data-theme='alto_contraste'] .erp-nav-subgroup-btn.active {
  border-color: #9ABAD6;
  box-shadow: none;
}
html[data-theme='alto_contraste'] :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #0067C5;
  outline-offset: 2px;
}
html[data-theme='alto_contraste'] :is(.card, .listing-card, .theme-current, .theme-option__surface) {
  border-color: #8997A8;
  box-shadow: none;
}
html[data-theme='alto_contraste'] .erp-topbar,
html[data-theme='alto_contraste'] .erp-breadcrumb {
  border-color: #8997A8;
}


html[data-theme='office'] .erp-sidebar :is(
  .erp-nav-row, .erp-nav-rowbtn, .erp-nav-subgroup-btn, .erp-nav-sub a,
  .erp-nav-fav-toggle, .nav-section-edit
):focus-visible,
html[data-theme='pastel'] .erp-sidebar :is(
  .erp-nav-row, .erp-nav-rowbtn, .erp-nav-subgroup-btn, .erp-nav-sub a,
  .erp-nav-fav-toggle, .nav-section-edit
):focus-visible,
html[data-theme='naranja'] .erp-sidebar :is(
  .erp-nav-row, .erp-nav-rowbtn, .erp-nav-subgroup-btn, .erp-nav-sub a,
  .erp-nav-fav-toggle, .nav-section-edit
):focus-visible {
  outline-color: var(--nav-accent);
}

.erp-sidebar :is(a, button) {
  -webkit-tap-highlight-color: transparent;
}


@media (hover: none), (pointer: coarse) {
  .erp-sidebar .erp-nav-row:hover:not(.active) {
    border-color: transparent;
    background: transparent;
    color: var(--nav-text);
    box-shadow: none;
  }
  .erp-sidebar .erp-nav-favorites .erp-nav-row:hover:not(.active) {
    border-color: transparent;
    background: transparent;
    color: var(--nav-text-secondary);
  }
  .erp-sidebar .erp-nav-row:hover:not(.active) .chev {
    opacity: .78;
  }
  .erp-sidebar .erp-nav-sub a:hover:not(.active) {
    border-color: transparent;
    background: transparent;
    color: var(--nav-sub-text);
    box-shadow: none;
  }
  .erp-sidebar .erp-nav-subgroup-btn:hover:not(.active),
  .erp-sidebar .erp-nav-fav-toggle:hover {
    border-color: transparent;
    background: transparent;
    color: var(--nav-sub-text);
    box-shadow: none;
  }
  .erp-sidebar .nav-section-edit:hover {
    background: transparent;
    color: var(--nav-text-secondary);
  }
  .erp-hamburger:hover {
    background: transparent;
  }
}


.cob-module-nav {
  margin-bottom: 14px;
  padding: 6px;
}
.cob-module-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 4px;
}
.cob-module-tab {
  display: inline-flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.cob-module-tab:hover {
  border-color: var(--primary-100);
  background: var(--primary-50);
  color: var(--primary-700);
  text-decoration: none;
}
.cob-module-tab.is-active {
  border-color: var(--primary-200);
  background: var(--primary-50);
  color: var(--primary-800);
  box-shadow: inset 0 -2px var(--primary-700);
}
.cob-module-tab:focus-visible,
.cob-module-more summary:focus-visible,
.cob-module-more-links a:focus-visible,
.cob-filter-disclosure summary:focus-visible {
  outline: 3px solid var(--primary-300);
  outline-offset: 2px;
}
.cob-module-more {
  margin-top: 6px;
  border-top: 1px solid var(--neutral-200);
}
.cob-module-more summary,
.cob-filter-disclosure summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  color: var(--neutral-700);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}
.cob-module-more summary::-webkit-details-marker,
.cob-filter-disclosure summary::-webkit-details-marker {
  display: none;
}
.cob-module-more summary::after,
.cob-filter-disclosure summary::after {
  content: "+";
  margin-left: auto;
  color: var(--primary-700);
  font-size: 18px;
  line-height: 1;
}
.cob-module-more[open] summary::after,
.cob-filter-disclosure[open] summary::after {
  content: "−";
}
.cob-module-more summary small,
.cob-filter-disclosure summary small {
  margin-left: auto;
  color: var(--neutral-500);
  font-size: 12px;
  font-weight: 500;
}
.cob-module-more summary::after,
.cob-filter-disclosure summary::after {
  margin-left: 0;
}
.cob-module-more-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  padding: 4px 6px 6px;
}
.cob-module-more-links a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: var(--r-md);
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.cob-module-more-links a:hover {
  background: var(--primary-50);
  text-decoration: none;
}

.cob-filter-card {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 16px;
}
.cob-filter-primary {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px) auto;
  gap: 10px;
  align-items: end;
}
.cob-filter-card label {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.cob-filter-card label > span {
  color: var(--neutral-600);
  font-size: 12px;
  font-weight: 700;
}
.cob-filter-card :is(.input, .select, .btn) {
  min-height: 40px;
}
.cob-filter-actions,
.cob-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cob-filter-disclosure {
  border-top: 1px solid var(--neutral-200);
}
.cob-filter-disclosure summary {
  padding-inline: 0;
}
.cob-filter-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  padding: 2px 0 4px;
}
.cob-filter-options-4 {
  grid-template-columns: repeat(4, minmax(145px, 1fr));
}
.cob-filter-compact {
  grid-template-columns: minmax(280px, 1fr) minmax(140px, 180px) auto;
}
.cob-btn-warning {
  border-color: var(--warning-500);
  background: var(--warning-50);
  color: var(--warning-700);
}
.cob-btn-warning:hover {
  border-color: var(--warning-700);
  background: var(--warning-100);
  color: var(--warning-700);
}
.cob-assign {
  display: flex;
  min-width: 230px;
  align-items: center;
  gap: 8px;
}
.cob-assign .select {
  min-width: 140px;
}
.cob-assign .btn,
.cob-row-actions .btn {
  min-height: 36px;
}
.cob-row-actions {
  min-width: max-content;
}
.cob-row-actions .btn-ghost {
  border: 1px solid transparent;
}
.cob-table-card,
.imp-table {
  padding: 0;
  overflow: hidden;
}
.cob-table-card .tbl :is(th, td):last-child,
.imp-table .tbl :is(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, .45);
}
.cob-table-card .tbl th:last-child,
.imp-table .tbl th:last-child {
  z-index: 3;
  background: var(--neutral-50);
}
.cob-table-card td small,
.imp-table td small {
  display: block;
  color: var(--neutral-500);
  font-size: 11px;
}
.cob-table-card .cob-empty,
.imp-empty {
  padding: 28px !important;
  color: var(--neutral-500);
  text-align: center;
}

.imp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.imp-kpis .kpi {
  min-height: 112px;
  padding: 13px 14px;
}
.imp-kpis .kpi .value {
  overflow-wrap: normal;
  font-size: clamp(20px, 1.7vw, 26px);
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .cob-filter-options-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .imp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .cob-module-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cob-module-tab {
    min-height: 48px;
    padding-inline: 8px;
  }
  .cob-module-more summary,
  .cob-filter-disclosure summary {
    min-height: 44px;
  }
  .cob-module-more summary small,
  .cob-filter-disclosure summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cob-module-more-links,
  .cob-filter-options,
  .cob-filter-options-4,
  .cob-filter-primary,
  .cob-filter-compact {
    grid-template-columns: minmax(0, 1fr);
  }
  .cob-filter-card {
    padding: 12px;
  }
  .cob-filter-card :is(.input, .select, .btn),
  .cob-assign :is(.select, .btn),
  .cob-row-actions .btn {
    min-height: 44px;
  }
  .cob-filter-card :is(.input, .select) {
    font-size: 16px;
  }
  .cob-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cob-filter-actions .btn {
    min-width: 0;
    justify-content: center;
  }
  .imp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .imp-kpis .kpi {
    min-height: 98px;
    gap: 5px;
    padding: 11px 12px;
  }
  .imp-kpis .kpi .label,
  .imp-kpis .kpi .sub {
    font-size: 11px;
  }
  .imp-kpis .kpi .value {
    font-size: clamp(17px, 5vw, 21px);
  }
}

@media (max-width: 380px) {
  .cob-module-tab {
    font-size: 12px;
  }
  .imp-kpis .kpi .value {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cob-module-tab {
    transition: none;
  }
}
