:root {
  color-scheme: light;
  --bg: #f8fafc;
  --paper: #fff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --green: #16a34a;
  --blue: #2563eb;
  --emerald: #059669;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; }
.topbar-logo img{
height: 1.75rem;
}
.boot, .center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar-inner, .page {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}
.topbar-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand h1 { margin: 0; font-size: 1.125rem; font-weight: 600; color: #0f172a; }
.brand p, .muted, .help { margin: 0; color: var(--muted); font-size: 0.75rem; }
.logo { max-height: 3rem; max-width: 8rem; object-fit: contain; }
.mark {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}
.menu {
  position: absolute;
  top: 2.6rem;
  left: 0;
  width: 16rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 0.25rem 0;
}
.menu-holder { position: relative; }
.menu { top: 2.5rem; width: 15rem; z-index: 50; overflow: hidden; border-radius: 0.75rem; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1); }
.menu form { margin: 0; }
.menu a,
.menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
}
.menu a:hover,
.menu button:hover { background: #f8fafc; }
.menu .who { padding: 0.5rem 0.75rem; border-bottom: 1px solid #f1f5f9; }
.who-name { margin: 0; font-size: 0.75rem; font-weight: 500; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { margin: 0 0 0.25rem; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #94a3b8; }

.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; }
.grow-1 { flex: 1 1 0; min-width: 0; }
.capitalize { text-transform: capitalize; }
.strong { margin: 0; font-weight: 500; color: #0f172a; }
.sub { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.soft { color: #475569; }
.faint { font-size: 0.75rem; color: #cbd5e1; }
.faint-text { margin: 0; font-size: 0.875rem; color: #94a3b8; }
.error-text { margin: 0; font-size: 0.875rem; color: #b91c1c; }
.tone-slate { color: #334155; }
.tone-green { color: var(--green); }
.tone-blue { color: var(--blue); }
.tone-emerald { color: var(--emerald); }
.icon-xs { width: 0.75rem; height: 0.75rem; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-xl { width: 3rem; height: 3rem; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon { display: inline-flex; align-items: center; gap: 0.5rem; }
.topbar .btn-primary { padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); transition: background-color 0.15s; }
.btn-muted { white-space: nowrap; color: #64748b; font-size: 0.875rem; padding: 0.5rem 0.75rem; }
.btn-muted:hover { color: #334155; }

.list-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 0.75rem; padding: 1rem; }
.stat-card p { margin: 0 0 0.25rem; font-size: 0.75rem; color: var(--muted); }
.stat-card b { display: block; font-size: 1.5rem; line-height: 2rem; font-weight: 700; }
.list-filters { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 0.75rem; }
.filter-row { display: flex; gap: 0.75rem; align-items: stretch; }
.filter-row select, .filter-row input { width: auto; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.filter-row select.grow-1, .filter-row input.grow-1 { width: 100%; }
.filter-row .input-icon > input { width: 100%; padding-left: 2.25rem; padding-right: 1rem; }
.filter-row input:focus, .filter-row select:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.list-error { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; padding: 0.75rem 1rem; border: 1px solid #fecaca; border-radius: 0.75rem; background: #fef2f2; color: #b91c1c; font-size: 0.875rem; }
.btn-retry { border: 1px solid #fecaca; border-radius: 0.5rem; background: #fff; color: inherit; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 600; }
.btn-retry:hover { background: #fee2e2; }
.list-table { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 0.75rem; }
.list-loading { display: flex; align-items: center; justify-content: center; padding: 4rem 0; color: var(--red); }
.list-loading-inline { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.875rem; color: var(--muted); }
.list-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 0; color: #94a3b8; }
.list-empty .icon-xl { margin-bottom: 0.75rem; opacity: 0.4; }
.list-empty p { margin: 0; }
.list-empty p + p { margin-top: 0.25rem; font-size: 0.875rem; }
.list-empty .strong { color: #94a3b8; }
.table-scroll { overflow-x: auto; }
.list-table th { padding: 0.75rem 1rem; font-weight: 500; font-size: 0.75rem; letter-spacing: 0.025em; border-bottom: 1px solid #f1f5f9; }
.list-table td { padding: 0.75rem 1rem; vertical-align: middle; }
.list-table td.num { font-size: 0.75rem; }
.list-table td.date { font-size: 0.75rem; color: var(--muted); }
.list-row { transition: background-color 0.15s; }
.list-row:hover, .list-row.open { background: #f8fafc; }
.list-sub > td { padding: 1rem 2rem; }
.sub-hierarchy { background: rgba(255, 251, 235, 0.3); }
.sub-ute { background: rgba(236, 253, 245, 0.4); }
.pill { display: inline-flex; border-radius: 999px; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 500; }
.pill-slate { background: #f1f5f9; color: #475569; }
.pill-sky { background: #e0f2fe; color: #0369a1; }
.pill-amber { background: #fef3c7; color: #b45309; }
.pill-green { background: #dcfce7; color: #15803d; }
.chip-toggle { display: inline-flex; align-items: center; gap: 0.375rem; border: 0; border-radius: 0.5rem; background: transparent; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 600; color: #475569; transition: background-color 0.15s; }
.chip-toggle:hover { background: #f1f5f9; }
.chip-toggle .chevron { transition: transform 0.15s; }
.chip-toggle.open .chevron { transform: rotate(180deg); }
.chip-ute { background: #ecfdf5; color: #047857; }
.chip-ute:hover { background: #d1fae5; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.25rem; }
.icon-btn { display: inline-flex; border: 0; border-radius: 0.5rem; background: transparent; padding: 0.375rem; color: #94a3b8; transition: background-color 0.15s, color 0.15s; }
.icon-btn:hover { background: #f1f5f9; color: #334155; }
.icon-btn-red:hover { background: #fef2f2; color: var(--red); }
.icon-btn:disabled { opacity: 0.4; }
.list-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.75rem; }
.list-pager p { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.list-pager .btn { padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; color: #475569; }
.hier-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem; }
.hier-focus { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 0.5rem; background: #fff; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.node-chip { display: inline-flex; align-items: center; gap: 0.25rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 500; color: #334155; text-decoration: none; transition: border-color 0.15s, color 0.15s; }
.node-chip:hover { border-color: #93c5fd; color: #1d4ed8; }
.ute-card { padding: 0.75rem; border: 1px solid #d1fae5; border-radius: 0.5rem; background: #fff; }
.ute-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.ute-card-head .strong { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.ute-card .pill { padding: 0.125rem 0.5rem; }
.ute-chip { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid #d1fae5; border-radius: 0.5rem; background: #ecfdf5; padding: 0.375rem 0.75rem; font-size: 0.75rem; color: #334155; text-decoration: none; }
.ute-chip:hover { border-color: #6ee7b7; }
.ute-chip .pct { font-weight: 600; color: #047857; }
.ute-chip .strong { font-weight: 500; color: inherit; }
@media (max-width: 1023px) { .col-lg { display: none; } }
@media (max-width: 767px) { .col-md { display: none; } .hier-grid { grid-template-columns: 1fr; } }
@media (max-width: 639px) {
  .col-sm { display: none; }
  .list-stats { grid-template-columns: repeat(2, 1fr); }
  .filter-row { flex-direction: column; }
  .filter-row select, .filter-row input { width: 100%; }
}

.page { padding: 1.5rem 0 3rem; }
.stats, .filters, .grid-2 { display: grid; gap: 0.75rem; }
.stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 1rem; }
.card, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}
.stat { padding: 1rem; }
.stat b { display: block; font-size: 1.5rem; }
.filters { padding: 1rem; margin-bottom: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.row > * { flex: 1 1 12rem; }
.grow { flex: 2 1 18rem; }

label.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.75rem; color: #475569; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.7rem;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid #fecaca;
  border-color: var(--red);
}
.check { flex-direction: row; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.check input { width: auto; }

.btn, .btn-primary, .btn-ghost {
  border-radius: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid transparent;
  background: #fff;
}
.btn { border-color: var(--line); color: #334155; }
.btn:hover { background: #f8fafc; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn:disabled, .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; justify-content: flex-end; gap: 0.35rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.75rem 0.8rem; text-align: left; vertical-align: top; }
th { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #f8fafc; }
tr + tr td { border-top: 1px solid #f1f5f9; }
.num { font-family: ui-monospace, monospace; font-size: 0.75rem; color: var(--muted); }
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #334155;
}
.badge.green { background: #dcfce7; color: #166534; }
.badge.sky { background: #e0f2fe; color: #075985; }
.badge.amber { background: #fef3c7; color: #92400e; }
.subrow { background: #fffbeb; }
.subrow.ute { background: #ecfdf5; }

.alert {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }

.login-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login { width: min(28rem, 100%); }
.login-card { border-radius: 1rem; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.login-card > header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.login-card h2 { margin: 0; font-size: 1rem; font-weight: 600; color: #0f172a; }
.login-badge {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: #fee2e2;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login-form { padding: 1.5rem; display: grid; gap: 1rem; }
.login-label { display: block; margin-bottom: 0.375rem; font-size: 0.75rem; font-weight: 500; color: #475569; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.input-icon > input { padding: 0.625rem 0.75rem 0.625rem 2.25rem; font-size: 0.875rem; }
.input-icon > input::placeholder { color: #94a3b8; }
.input-icon > input:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.875rem;
}
.login-alert > .icon { margin-top: 0.125rem; flex-shrink: 0; }
.login-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s;
}
.login-note { margin: 1rem 0 0; text-align: center; font-size: 0.75rem; color: #94a3b8; }
.icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.mark { display: inline-flex; align-items: center; justify-content: center; }
.section-head {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.section { padding: 1.25rem; display: grid; gap: 0.8rem; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { margin: 0 0 0.8rem; font-size: 0.95rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.dl { display: grid; grid-template-columns: 11rem 1fr; gap: 0.35rem 0.8rem; margin: 0; }
.dl dt { color: var(--muted); font-size: 0.75rem; }
.dl dd { margin: 0; }

.stack { display: grid; gap: 0.75rem; }
.notice {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.875rem;
}
.contact {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.9rem;
  display: grid;
  gap: 0.7rem;
}
.contact header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
.x3 { font-family: ui-monospace, monospace; font-size: 0.75rem; color: #7f1d1d; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.35);
  padding: 2.5rem 1rem;
  backdrop-filter: blur(4px);
}
.overlay.tall { padding-top: 4rem; padding-bottom: 4rem; }
.overlay-panel { width: 100%; max-width: 64rem; outline: none; }
.overlay-panel.narrow { max-width: 48rem; }
.overlay-close-row { display: flex; justify-content: flex-end; margin-bottom: 0.5rem; }
.overlay-close { border: 0; border-radius: 0.5rem; background: #fff; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 500; color: #475569; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06); }
.overlay-close:hover { background: #f8fafc; }
.ok {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-size: 0.875rem;
}

@media (max-width: 800px) {
  .stats, .grid-2, .dl { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}

/* Vista de ficha */
.icon-xxs { width: 0.625rem; height: 0.625rem; }
.icon-sm { width: 0.875rem; height: 0.875rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.faded { opacity: 0.5; }
.faint-icon { color: #94a3b8; }
.tone-red { color: var(--red); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.ml-6 { margin-left: 1.5rem; }
.ml-8 { margin-left: 2rem; }
.ml-10 { margin-left: 2.5rem; }
.ml-auto { margin-left: auto; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center-text { text-align: center; }
.italic { font-style: italic; color: var(--muted) !important; }
.pre { white-space: pre-wrap; }
.gap-2 { gap: 0.5rem; }
.inline-gap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.inline-gap-3 { display: flex; align-items: center; gap: 0.75rem; }
.strong-inherit { margin: 0; font-weight: 600; }
.strong-xs { font-weight: 500; }
.vstack { display: grid; gap: 1rem; }
.vstack-lg { display: grid; gap: 1.25rem; }
.vstack-sm { display: grid; gap: 0.75rem; }
.vstack-xs { display: grid; gap: 0.5rem; }
.vstack-xxs { display: grid; gap: 0.25rem; }

.detail-page { min-height: 100vh; }
.detail-top { min-height: 4rem; }
.detail-top .brand { gap: 0.75rem; }
.icon-btn-lg { padding: 0.5rem; }
.vdivider { width: 1px; height: 1.5rem; background: var(--line); }
.detail-logo { height: 2.25rem; width: auto; max-width: 120px; object-fit: contain; border-radius: 0.125rem; }
.detail-title { margin: 0; font-size: 1rem !important; font-weight: 600; color: #0f172a; }
.grupo-badge { margin-left: 0.5rem; padding: 0.125rem 0.375rem; border-radius: 0.125rem; font-size: 0.625rem; font-weight: 700; vertical-align: middle; background: #fee2e2; color: #b91c1c; }
.grupo-egp { background: #dbeafe; color: #1d4ed8; }
.grupo-ajj_portugal { background: #dcfce7; color: #15803d; }
.head-actions { display: flex; align-items: center; gap: 0.5rem; }
.btn-share { padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500; color: #334155; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.btn-head { padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; }

.detail-wrap { padding-top: 1.5rem; }
.detail-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.detail-nav { width: 13rem; flex-shrink: 0; position: sticky; top: 80px; align-self: flex-start; }
.nav-card { background: #fff; border: 1px solid var(--line); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.nav-head { padding: 0.625rem 0.75rem; border-bottom: 1px solid #f1f5f9; background: #f8fafc; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #94a3b8; }
.detail-nav nav { padding: 0.25rem 0; }
.nav-item { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.5rem 0.75rem; border: 0; border-left: 2px solid transparent; background: transparent; text-align: left; font-size: 0.75rem; color: #475569; text-decoration: none; transition: all 0.15s; }
.nav-item:hover { background: #f8fafc; color: #0f172a; }
.nav-dot { width: 0.375rem; height: 0.375rem; border-radius: 999px; background: #cbd5e1; flex-shrink: 0; }
.nav-item:hover .nav-dot { background: #94a3b8; }
.nav-item.active { background: #fef2f2; color: #b91c1c; font-weight: 600; border-left-color: #ef4444; }
.nav-item.active .nav-dot { background: #ef4444; }
.detail-main { flex: 1; min-width: 0; display: grid; gap: 1rem; }
.detail-main > div[id] { scroll-margin-top: 5rem; }
.detail-meta { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.25rem 2rem; font-size: 0.75rem; color: #94a3b8; }
.detail-meta div { display: flex; align-items: center; gap: 0.375rem; }

.vcard { background: #fff; border: 1px solid var(--line); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.vcard-head { display: flex; align-items: center; gap: 0.625rem; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; background: #f8fafc; }
.vcard-head h3 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.vcard-icon { display: inline-flex; padding: 0.375rem; border-radius: 0.5rem; background: #fee2e2; color: var(--red); }
.vcard-body { padding: 1rem 1.25rem; }
.vgrid { display: grid; gap: 1rem; }
.vgrid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vgrid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vgrid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vitem .vgrid, .vitem.vgrid { gap: 0.75rem; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }
.vf { min-width: 0; }
.vf-label { margin: 0 0 0.125rem; font-size: 0.75rem; color: #94a3b8; }
.vf-value { margin: 0; font-size: 0.875rem; color: #1e293b; overflow-wrap: anywhere; }
.dash { color: #cbd5e1; }
.dash-sm { font-size: 0.875rem; }
.field-link { display: flex; align-items: center; gap: 0.375rem; color: var(--blue); text-decoration: none; transition: color 0.15s; }
.field-link:hover { color: #1d4ed8; text-decoration: underline; }

.field-link { color:var(--ink); font-weight:600; }
.field-link:hover { color: var(--red);text-decoration:none }

.map-link { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 0.125rem; font-size: 0.75rem; color: #94a3b8; text-decoration: none; }
.map-link:hover { color: var(--blue); text-decoration: underline; }
.link-xs { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--blue); text-decoration: none; }
.link-xs:hover { text-decoration: underline; }
.ok-pill { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: 999px; background: #f0fdf4; color: #15803d; font-size: 0.75rem; }
.crm-badge { display: inline-flex; align-items: center; padding: 0.25rem 0.625rem; border-radius: 999px; background: #dbeafe; color: #1e40af; font-size: 0.75rem; font-weight: 600; }
.vsep { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.vsep-inner { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.vsub, .vitem > p.vsub { display: flex; align-items: center; gap: 0.375rem; margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: var(--muted); }
.vtext { margin: 0; font-size: 0.875rem; color: #334155; }
.vmuted { margin: 0; font-size: 0.875rem; color: #94a3b8; }
.vnote { margin: 0.75rem 0 0; font-size: 0.75rem; color: var(--muted); }
.logo-block { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #f1f5f9; }
.logo-big { height: 3.5rem; width: auto; max-width: 200px; object-fit: contain; }
.vitem { padding: 0.75rem; border-radius: 0.5rem; background: #f8fafc; border: 1px solid #f1f5f9; }
.vitem-pad { padding: 1rem; }
.vitem-row { display: flex; align-items: flex-start; gap: 1rem; }
.vitem-row.center-y { align-items: center; }
.vitem-title, .vitem > p.vitem-title { margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.avatar { width: 2rem; height: 2rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar-sm { width: 1.75rem; height: 1.75rem; }
.avatar-red { background: #fee2e2; color: var(--red); }
.avatar-blue { background: #dbeafe; color: var(--blue); }
.mini-pill { display: inline-flex; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.625rem; font-weight: 600; flex-shrink: 0; }
.pill-emerald { background: #ecfdf5; color: #047857; }
.contact-line { padding-left: 0.5rem; border-left: 2px solid var(--line); gap: 0.5rem !important; }
.schedule { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: #475569; }
.person-chip { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 0.75rem; color: #334155; }
.person-chip-grey { padding: 0.375rem 0.75rem; background: #f1f5f9; }

.hier-toggle { display: flex; align-items: center; gap: 0.5rem; width: 100%; border: 0; background: transparent; padding: 0; font-size: 0.875rem; font-weight: 600; color: #334155; }
.hier-toggle:hover { color: #0f172a; }
.hier-toggle .chevron { transition: transform 0.15s; }
.hier-toggle.open .chevron { transform: rotate(180deg); }
.level-pill { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.25rem; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.tone-pill-amber { background: #fef3c7; color: #92400e; }
.tone-pill-blue { background: #dbeafe; color: #1e40af; }
.tone-pill-slate { background: #f1f5f9; color: #334155; }
.tone-pill-red { background: #fef2f2; color: #ef4444; }
.tone-blue-dark { color: #1e40af; }
.legacy-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.5rem; background: #f8fafc; }
.legacy-self { border: 1px solid; }
.legacy-amber { background: #fffbeb; border-color: #fde68a; }
.legacy-blue { background: #eff6ff; border-color: #bfdbfe; }
.legacy-slate { background: #f1f5f9; border-color: #cbd5e1; }
.legacy-icon { width: 1.5rem; height: 1.5rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.legacy-icon-amber { background: #fde68a; color: #92400e; }
.legacy-icon-blue { background: #bfdbfe; color: #1e40af; }
.legacy-icon-slate { background: #e2e8f0; color: #334155; }
.legacy-label { margin: 0; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.025em; text-transform: uppercase; color: #94a3b8; }
.legacy-line { width: 1px; height: 0.75rem; background: var(--line); }
.self-badge { padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }
.legacy-badge-amber { background: #fef3c7; color: #b45309; }
.legacy-badge-blue { background: #dbeafe; color: #1d4ed8; }
.legacy-badge-slate { background: #e2e8f0; color: #334155; }
.line-pill { display: inline-flex; padding: 0.125rem 0.5rem; border-radius: 999px; background: #dbeafe; border: 1px solid #bfdbfe; font-size: 0.75rem; font-weight: 600; color: #1d4ed8; }
.link-plain { border: 0; background: transparent; padding: 0; text-align: left; font-size: 0.875rem; font-weight: 500; color: #334155; }
.link-plain:hover { color: #1d4ed8; text-decoration: underline; }
.link-btn { border: 0; background: transparent; padding: 0; text-align: left; font-weight: 500; color: #1d4ed8; }
.link-btn:hover { text-decoration: underline; }

.tree-box { padding: 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: #f8fafc; }
.tree-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.tree-head h4 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.tree-head p { margin: 0.125rem 0 0; font-size: 0.75rem; color: var(--muted); }
.seg { display: inline-flex; padding: 0.25rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; }
.seg button { display: inline-flex; align-items: center; gap: 0.375rem; border: 0; border-radius: 0.375rem; background: transparent; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 500; color: #475569; }
.seg button:hover { background: #f8fafc; }
.seg button.on { background: #1e293b; color: #fff; }
.tree-alert { margin-top: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid #fcd34d; border-radius: 0.5rem; background: #fffbeb; font-size: 0.875rem; color: #78350f; }
.tree-alert ul { margin: 0.25rem 0 0; padding-left: 1.25rem; font-size: 0.75rem; }
.tree-guard { padding: 0.75rem 1rem; border: 1px solid #fcd34d; border-radius: 0.5rem; background: #fffbeb; font-size: 0.875rem; color: #451a03; }
.dark-btn { border: 0; border-radius: 0.5rem; background: #1e293b; color: #fff; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 600; }
.amber-btn { border: 1px solid #fbbf24; border-radius: 0.5rem; background: #fff; color: #451a03; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 600; }
.tree-root, .tree-group { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.tree-group { gap: 0.5rem; margin: 0.5rem 0 0 1.25rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.edge-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-bottom: 0.25rem; padding-left: 0.5rem; font-size: 0.6875rem; color: var(--muted); }
.edge-line { padding: 0.125rem 0.5rem; border-radius: 999px; background: #f1f5f9; }
.tree-node { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; color: #1e293b; scroll-margin-top: 6rem; outline: none; }
.node-amber { border-color: #fde68a; background: #fffbeb; color: #78350f; }
.node-blue { border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.node-current { border-color: #fca5a5; background: #fef2f2; color: #7f1d1d; box-shadow: 0 0 0 2px #fee2e2; }
.tree-icon { display: flex; width: 2rem; height: 2rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255, 255, 255, 0.8); }
.tree-level { margin: 0; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; opacity: 0.7; }
.tree-name { margin: 0; font-size: 0.875rem; font-weight: 600; overflow-wrap: anywhere; }
.tree-link { border: 0; background: transparent; padding: 0; text-align: left; font-size: 0.875rem; font-weight: 600; color: #1d4ed8; overflow-wrap: anywhere; }
.tree-link:hover { text-decoration: underline; }
.tree-current { padding: 0.125rem 0.5rem; border-radius: 999px; background: #fee2e2; color: #991b1b; font-size: 0.625rem; font-weight: 600; }
.tree-ref { display: block; padding: 0.5rem 0.75rem; border: 1px dashed #cbd5e1; border-radius: 0.5rem; background: #fff; font-size: 0.875rem; font-weight: 500; color: #1d4ed8; }
.tree-ref-note { margin-left: 0.25rem; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.tree-self { font-weight: 600; color: #991b1b; }
.tree-table { border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; }
.tree-table th { background: #f1f5f9; color: #475569; padding: 0.5rem 0.75rem; }
.tree-table td { padding: 0.5rem 0.75rem; }
.tree-table-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0.75rem; border-top: 1px solid var(--line); }
.tree-table-foot p { margin: 0; font-size: 0.75rem; color: var(--muted); }
.btn-xs { padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 600; }

.ute-box { overflow: hidden; border: 1px solid #a7f3d0; border-radius: 0.75rem; }
.ute-box-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 1rem; background: #ecfdf5; color: #064e3b; }
.ute-box-head h4 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.ute-box-head p { margin: 0.125rem 0 0; font-size: 0.75rem; opacity: 0.75; }
.ute-badge { padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: #d1fae5; color: #065f46; }
.ute-blue { border-color: #bfdbfe; }
.ute-blue .ute-box-head { background: #eff6ff; color: #1e3a8a; }
.ute-blue .ute-badge { background: #dbeafe; color: #1e40af; }
.ute-slate { border-color: #cbd5e1; }
.ute-slate .ute-box-head { background: #f1f5f9; color: #0f172a; }
.ute-slate .ute-badge { background: #e2e8f0; color: #334155; }
.ute-red { border-color: #fecaca; }
.ute-red .ute-box-head { background: #fef2f2; color: #7f1d1d; }
.ute-red .ute-badge { background: #fee2e2; color: #991b1b; }
.ute-box-body { padding: 1rem; }
.ute-summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.75rem; color: var(--muted); }
.strong-emerald { font-weight: 600; color: #047857; }
.strong-amber { font-weight: 600; color: #b45309; }
.integrity { margin-bottom: 1rem; padding: 0.5rem 0.75rem; border: 1px solid; border-radius: 0.5rem; font-size: 0.75rem; }
.integrity p { margin: 0.125rem 0 0; }
.integrity ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.integrity-warn { border-color: #fcd34d; background: #fffbeb; color: #78350f; }
.integrity-ok { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.roster-title { display: flex; align-items: center; gap: 0.375rem; margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #475569; }
.roster { list-style: none; margin: 0; padding: 0; border: 1px solid #f1f5f9; border-radius: 0.5rem; }
.roster li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.roster li + li { border-top: 1px solid #f1f5f9; }
.roster-pct { margin-left: auto; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.tone-bg-emerald { background: #ecfdf5; color: #047857; }
.tone-bg-blue { background: #eff6ff; color: #1d4ed8; }
.roster-dates { font-size: 0.6875rem; color: var(--muted); }
.roster-empty { margin: 0; padding: 0.5rem 0.75rem; border: 1px solid #f1f5f9; border-radius: 0.5rem; background: #f8fafc; font-size: 0.875rem; color: var(--muted); }
.ute-obs { margin: 0.75rem 0 0; white-space: pre-wrap; font-size: 0.75rem; color: var(--muted); }
.mini-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 0.5rem; }
.mini-table table { font-size: 0.75rem; }
.mini-table th { padding: 0.5rem 0.75rem; background: #f8fafc; color: #475569; text-transform: none; letter-spacing: 0; font-size: 0.75rem; }
.mini-table td { padding: 0.5rem 0.75rem; color: #475569; white-space: nowrap; }

.x3-box { padding: 1rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; }
.x3-box h3 { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #475569; }
.x3-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0.75rem 0 0; }
.x3-grid dt { font-size: 0.75rem; color: var(--muted); }
.x3-grid dd { margin: 0.25rem 0 0; font-size: 0.875rem; color: #1e293b; overflow-wrap: anywhere; }
.x3-grid dd.empty { color: #94a3b8; }
.x3-grid dd.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.x3-box > p, .vitem > p, .leyenda { margin: 0.75rem 0 0; font-size: 0.75rem; color: #475569; }
.x3-box > p + p, .vitem > p + p { margin-top: 0.5rem; }

.x3-review { margin: 0 0 1rem; padding: 1rem; border: 1px solid; border-radius: 0.5rem; font-size: 0.875rem; }
.x3-review-loading { padding: 0.75rem 1rem; border-color: var(--line); background: #fff; color: #475569; }
.x3-review-pending { border-color: #fcd34d; background: #fffbeb; color: #451a03; }
.x3-review-error { border-color: #fde68a; background: #fffbeb; color: #451a03; }
.x3-review h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.x3-review p { margin: 0; }
.x3-review ul { margin: 0.5rem 0 0; padding-left: 1.25rem; list-style: disc; display: grid; gap: 0.25rem; }
.x3-review-retry { margin-top: 0.5rem; border: 0; border-radius: 0.125rem; background: transparent; padding: 0.25rem 0.5rem; font-size: 0.875rem; font-weight: 500; color: inherit; text-decoration: underline; }
.x3-review-retry:hover { background: #fef3c7; }
.share-band { background: #eff6ff; border-bottom: 1px solid #bfdbfe; }
.share-inner { width: min(1280px, calc(100% - 2rem)); margin: 0 auto; padding: 0.75rem 0; display: flex; align-items: flex-start; gap: 0.75rem; }
.share-title { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; padding-top: 0.5rem; color: #1d4ed8; font-size: 0.875rem; font-weight: 500; }
.share-form { display: grid; gap: 0.5rem; }
.share-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.share-row.nowrap { flex-wrap: nowrap; align-items: center; min-width: 0; }
.share-label { font-size: 0.6875rem; font-weight: 500; color: #1d4ed8; }
.share-input { display: block; width: auto; margin-top: 0.25rem; padding: 0.375rem 0.625rem; border: 1px solid #bfdbfe; border-radius: 0.5rem; background: #fff; font-size: 0.75rem; color: #334155; }
.share-input:focus { outline: 2px solid #60a5fa; border-color: #bfdbfe; }
.share-number { width: 7rem; }
.share-reason { width: 100%; max-width: 36rem; }
.share-help { display: block; margin-top: 0.25rem; font-weight: 400; color: var(--blue); }
.share-scopes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; padding: 0.375rem 0.625rem; border: 1px solid #bfdbfe; border-radius: 0.5rem; background: #fff; }
.share-check { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.6875rem; font-weight: 500; color: #1e40af; }
.share-check input { width: auto; }
.share-btn { display: inline-flex; align-items: center; gap: 0.375rem; flex-shrink: 0; border: 0; border-radius: 0.5rem; background: var(--blue); color: #fff; padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 500; transition: background-color 0.15s; }
.share-btn:hover { background: #1d4ed8; }
.share-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.share-btn-ok, .share-btn-ok:hover { background: var(--green); }
.share-btn-lg { padding: 0.5rem 1rem; font-size: 0.875rem; }
.share-outline { display: inline-flex; align-items: center; gap: 0.375rem; flex-shrink: 0; border: 1px solid #93c5fd; border-radius: 0.5rem; background: #fff; color: #1d4ed8; padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 500; }
.share-outline:hover { background: #dbeafe; }
.share-ghost { border: 0; background: transparent; padding: 0.5rem; border-radius: 0.5rem; font-size: 0.75rem; color: #60a5fa; }
.share-ghost:hover { color: #1d4ed8; }
.share-url { flex: 1; min-width: 0; padding: 0.5rem 0.75rem; border: 1px solid #bfdbfe; border-radius: 0.5rem; background: #fff; font-size: 0.75rem; color: #334155; }
.share-note { margin: 0; font-size: 0.6875rem; color: #1d4ed8; }
.share-error { margin: 0; font-size: 0.75rem; color: var(--red); }
.share-status { margin: 0.75rem 0 0; font-size: 0.75rem; color: var(--blue); }
.share-status.faint { color: #3b82f6; }
.share-links { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #bfdbfe; }
.share-links-title { margin: 0 0 0.5rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #1d4ed8; }
.share-link { padding: 0.5rem 0.75rem; border: 1px solid #bfdbfe; border-radius: 0.5rem; background: #fff; font-size: 0.75rem; color: #475569; }
.share-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.share-link-actions { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.share-link-btn { border: 0; border-radius: 0.125rem; background: transparent; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 500; color: #1d4ed8; }
.share-link-btn:hover { background: #eff6ff; }
.share-link-btn.danger { color: var(--red); }
.share-link-btn.danger:hover { background: #fef2f2; }
.share-link-btn:disabled { opacity: 0.5; }
.share-last { margin: 0.25rem 0 0; font-size: 0.6875rem; color: #94a3b8; }
.share-empty { margin: 0; padding: 0.5rem 0.75rem; color: #94a3b8; }

.modal-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); }
.modal { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 42rem; max-height: 90vh; border-radius: 1rem; background: #fff; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); outline: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid #f1f5f9; }
.modal-head h3 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.modal-head p { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.modal-mark { display: flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 0.5rem; background: var(--blue); color: #fff; }
.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; display: grid; gap: 1.25rem; }
.modal-label { display: block; margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: var(--muted); }
.modal-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.modal-row .modal-label { margin: 0; }
.modal-input { flex: 1; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.modal-input:focus { outline: 2px solid #60a5fa; border-color: transparent; }
.modal-hint { margin: 0.25rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.add-btn { display: inline-flex; align-items: center; gap: 0.375rem; border: 0; border-radius: 0.5rem; background: #f1f5f9; color: #334155; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500; }
.add-btn:hover { background: #e2e8f0; }
.email-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 0.75rem; font-weight: 500; }
.email-chip button { display: inline-flex; border: 0; background: transparent; padding: 0; color: inherit; }
.copy-small { display: inline-flex; align-items: center; gap: 0.375rem; border: 0; border-radius: 0.5rem; background: #f1f5f9; color: #475569; padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 500; }
.copy-small:hover { background: #e2e8f0; }
.copy-small.copied { background: #dcfce7; color: #15803d; }
.template { padding: 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: #f8fafc; font-family: ui-monospace, monospace; font-size: 0.75rem; line-height: 1.625; color: #334155; white-space: pre-wrap; user-select: all; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-top: 1px solid #f1f5f9; border-radius: 0 0 1rem 1rem; background: #f8fafc; }
.modal-foot-text { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.cancel-btn { border: 0; border-radius: 0.5rem; background: transparent; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; color: #475569; }
.cancel-btn:hover { background: #e2e8f0; color: #1e293b; }

/* Historial de cambios */
.icon-hist { width: 0.75rem; height: 0.75rem; flex-shrink: 0; }
.hist-card { overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.hist-head { padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; background: #f8fafc; }
.hist-title { display: flex; align-items: center; gap: 0.75rem; }
.hist-title h2 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.hist-title-icon { display: inline-flex; padding: 0.375rem; border-radius: 0.5rem; background: #e2e8f0; color: #475569; }
.hist-count { margin-left: auto; padding: 0.125rem 0.625rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.75rem; color: #94a3b8; }
.hist-role-counts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.hist-role-count { display: flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.25rem 0.25rem 0.625rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.hist-role-count .icon { color: #64748b; }
.hist-role-count span { font-size: 0.75rem; font-weight: 500; color: #475569; }
.hist-role-count b { padding: 0.125rem 0.375rem; border-radius: 999px; background: #22c55e; font-size: 0.6875rem; color: #fff; }
.hist-loading { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 3rem 0; font-size: 0.875rem; color: var(--muted); }
.hist-error { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 3rem 1.25rem; text-align: center; }
.hist-error p { margin: 0; font-size: 0.875rem; color: #b91c1c; }
.hist-empty { padding: 3rem 0; text-align: center; color: #94a3b8; }
.hist-empty .icon { display: block; margin: 0 auto 0.5rem; width: 2rem; height: 2rem; opacity: 0.2; }
.hist-empty p, .hist-noresults p { margin: 0; font-size: 0.875rem; }
.hist-noresults { padding: 2.5rem 0; text-align: center; color: #94a3b8; }
.hist-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.hist-filter-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.hist-filter { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.6875rem; font-weight: 600; color: #64748b; transition: all 0.15s; }
.hist-filter:hover { border-color: #86efac; color: #15803d; }
.hist-filter.active { border-color: #22c55e; background: #22c55e; color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.hist-search { position: relative; margin-left: auto; }
.hist-search .icon { position: absolute; top: 50%; left: 0.625rem; transform: translateY(-50%); }
.hist-search input { width: 13rem; padding: 0.375rem 0.75rem 0.375rem 1.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.75rem; color: #334155; }
.hist-search input::placeholder { color: #94a3b8; }
.hist-search input:focus { outline: none; border-color: #4ade80; box-shadow: 0 0 0 2px #4ade80; }
.hist-table { width: 100%; }
.hist-table > thead > tr > th { padding: 0.625rem 1rem; border-bottom: 1px solid #f1f5f9; background: #f8fafc; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #64748b; }
.hist-table > thead > tr > th:last-child { padding: 0.625rem 0.75rem; }
.hist-table > tbody > tr + tr > td { border-top: 0; }
.hist-row > td { padding: 0.75rem 1rem; vertical-align: top; }
.hist-row.bordered { border-bottom: 1px solid #f1f5f9; }
.hist-row:hover { background: #f8fafc; }
.hist-actor { display: flex; align-items: center; gap: 0.5rem; }
.hist-actor span { font-size: 0.875rem; font-weight: 600; line-height: 1.25; color: #1e293b; }
.hist-avatar { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; }
.hist-depts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.hist-dept { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.625rem; border: 1px solid transparent; border-radius: 999px; background: #f1f5f9; font-size: 0.6875rem; font-weight: 600; color: #64748b; transition: color 0.15s, background-color 0.15s; }
.solid-violet { background: #8b5cf6; border-color: #8b5cf6; color: #fff; }
.solid-green { background: #22c55e; border-color: #22c55e; color: #fff; }
.solid-slate { background: #64748b; border-color: #64748b; color: #fff; }
.solid-blue { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.hist-meta { display: flex; align-items: center; gap: 0.25rem; }
.hist-meta code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.6875rem; color: #475569; }
.hist-time { margin: 0; font-size: 0.75rem; font-weight: 600; color: #334155; }
.hist-date { margin: 0; font-size: 0.6875rem; color: #94a3b8; }
.hist-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.hist-chip { display: inline-block; padding: 0.125rem 0.375rem; border: 1px solid var(--line); border-radius: 0.125rem; background: #f1f5f9; font-size: 0.625rem; font-weight: 500; color: #475569; }
.hist-more { align-self: center; font-size: 0.6875rem; font-weight: 500; color: #94a3b8; }
.hist-none { font-size: 0.6875rem; font-style: italic; color: #94a3b8; }
.hist-row > td.hist-toggle-cell { padding: 0.75rem; text-align: center; }
.hist-toggle { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border: 1px solid var(--line); border-radius: 0.5rem; background: transparent; font-size: 0.6875rem; font-weight: 500; color: #64748b; transition: color 0.15s, background-color 0.15s; }
.hist-toggle:hover { background: #f1f5f9; color: #334155; }
.hist-detail { border-bottom: 1px solid #f1f5f9; }
.hist-detail > td { padding: 0 1rem 1rem; }
.hist-detail-box { overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; }
.hist-detail-box table { width: 100%; font-size: 0.75rem; }
.hist-detail-box th { width: 33.333%; padding: 0.5rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; font-size: 0.75rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: #64748b; }
.hist-detail-box td { padding: 0.5rem 1rem; vertical-align: top; }
.hist-detail-box tbody tr + tr td { border-top: 1px solid #f1f5f9; }
.hist-detail-box tbody tr:hover { background: #f8fafc; }
.hist-dot-label { display: flex; align-items: center; gap: 0.25rem; }
.hist-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 999px; }
.dot-before { background: #fca5a5; }
.dot-after { background: #4ade80; }
.hist-field { font-weight: 600; color: #334155; }
.hist-before { white-space: pre-wrap; overflow-wrap: anywhere; color: #94a3b8; }
.hist-after { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 500; color: #1e293b; }
.hist-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1.25rem; border-top: 1px solid #f1f5f9; }
.hist-footer > p { margin: 0; font-size: 0.75rem; color: var(--muted); }
.hist-footer .hist-footer-error { flex-basis: 100%; font-size: 0.875rem; color: #b91c1c; }

/* Paneles de documentos y solicitudes */
.tone-soft-blue { background: #eff6ff; color: #1d4ed8; }
.tone-soft-amber { background: #fffbeb; color: #b45309; }
.tone-soft-red { background: #fef2f2; color: #b91c1c; }
.tone-soft-violet { background: #f5f3ff; color: #6d28d9; }
.tone-soft-slate { background: #f1f5f9; color: #64748b; }
.tone-soft-emerald { background: #ecfdf5; color: #047857; }
.panel-card { overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.panel-title { display: flex; align-items: center; gap: 0.625rem; }
.panel-title h3 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.panel-icon { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.5rem; }
.panel-icon.tone-soft-blue { color: #2563eb; }
.panel-icon.tone-soft-amber { color: #d97706; }
.panel-sub { margin: 0.125rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.panel-refresh { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.625rem; border: 0; border-radius: 0.5rem; background: transparent; font-size: 0.75rem; font-weight: 500; color: #64748b; transition: background-color 0.15s, color 0.15s; }
.panel-refresh:hover { background: #f1f5f9; color: #334155; }
.panel-refresh:disabled { cursor: not-allowed; opacity: 0.5; }
.panel-body { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }
.panel-body > div:empty { display: none; }
.panel-stack { display: flex; flex-direction: column; gap: 1rem; }
.panel-stack-lg { display: flex; flex-direction: column; gap: 1rem; }
.panel-warn, .panel-error, .panel-ok { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 0.75rem; border: 1px solid; border-radius: 0.5rem; font-size: 0.875rem; }
.panel-warn { justify-content: flex-start; gap: 0.5rem; border-color: #fde68a; background: #fffbeb; color: #b45309; }
.panel-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.panel-ok { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.panel-warn > .icon, .panel-msg > .icon { flex-shrink: 0; margin-top: 0.125rem; }
.panel-msg { display: flex; align-items: flex-start; gap: 0.5rem; }
.panel-close { display: inline-flex; padding: 0.125rem; border: 0; border-radius: 0.125rem; background: transparent; color: inherit; opacity: 0.7; }
.panel-close:hover { opacity: 1; }
.panel-info { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; font-size: 0.75rem; color: #64748b; }
.panel-info .icon { flex-shrink: 0; }
.panel-label { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 500; color: #475569; }
.panel-loading { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 2.5rem 0; font-size: 0.875rem; color: #94a3b8; }
.panel-empty { padding: 2.25rem 1rem; border: 2px dashed var(--line); border-radius: 0.75rem; text-align: center; }
.panel-empty-icon { display: block; margin: 0 auto; width: 2rem; height: 2rem; color: #cbd5e1; }
.panel-empty-icon.tone-emerald-soft { color: #6ee7b7; }
.panel-empty-title { margin: 0.5rem 0 0; font-size: 0.875rem; font-weight: 500; color: #64748b; }
.panel-empty-text { margin: 0.25rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.doc-uploader { display: grid; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(248, 250, 252, 0.6); }
.doc-uploader select { padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.875rem; color: #1e293b; }
.doc-uploader select:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #3b82f6; }
.doc-uploader select:disabled { cursor: not-allowed; background: #f8fafc; color: #94a3b8; }
.doc-attach { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.5rem 1rem; border: 0; border-radius: 0.5rem; background: #2563eb; font-size: 0.875rem; font-weight: 500; color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); transition: background-color 0.15s; }
.doc-attach:hover { background: #1d4ed8; }
.doc-attach:disabled { cursor: not-allowed; opacity: 0.6; }
.doc-hint { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.doc-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 0.75rem; }
.doc-list > li { padding: 0.75rem; }
.doc-list > li + li { border-top: 1px solid #f1f5f9; }
.doc-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.doc-icon { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin-top: 0.125rem; border-radius: 0.5rem; }
.doc-icon.tone-soft-violet { color: #7c3aed; }
.doc-icon.tone-soft-red { color: #dc2626; }
.doc-main { flex: 1; min-width: 0; }
.doc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.doc-name { overflow: hidden; max-width: 100%; margin: 0; font-size: 0.875rem; font-weight: 500; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.doc-flag { padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; }
.doc-vis { padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.625rem; font-weight: 500; }
.doc-meta { margin: 0.25rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.doc-actions { display: flex; flex-shrink: 0; align-items: center; gap: 0.25rem; }
.doc-btn { display: inline-flex; padding: 0.375rem; border: 0; border-radius: 0.375rem; background: transparent; color: #94a3b8; transition: background-color 0.15s, color 0.15s; }
.doc-btn:hover { background: #eff6ff; color: #2563eb; }
.doc-btn-red:hover { background: #fef2f2; color: #dc2626; }
.doc-btn:disabled { opacity: 0.5; }
.doc-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid #fee2e2; border-radius: 0.5rem; background: #fef2f2; }
.doc-confirm p { margin: 0 auto 0 0; font-size: 0.75rem; color: #b91c1c; }
.doc-cancel, .req-cancel { padding: 0.25rem 0.625rem; border: 0; border-radius: 0.375rem; background: transparent; font-size: 0.75rem; font-weight: 500; color: #475569; }
.doc-cancel:hover, .req-cancel:hover { background: #fff; }
.doc-delete { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border: 0; border-radius: 0.375rem; background: #dc2626; font-size: 0.75rem; font-weight: 500; color: #fff; }
.doc-delete:hover { background: #b91c1c; }
.doc-delete:disabled { opacity: 0.6; }
.req-title-row { display: flex; align-items: center; gap: 0.5rem; }
.req-count { padding: 0.125rem 0.5rem; border-radius: 999px; background: #fef3c7; font-size: 0.625rem; font-weight: 600; color: #b45309; }
.req-tabs-wrap { padding: 0.5rem 0.75rem 0; border-bottom: 1px solid #f1f5f9; }
.req-tabs { display: flex; gap: 0.25rem; overflow-x: auto; }
.req-tab { padding: 0.5rem 0.75rem; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 0.75rem; font-weight: 500; color: #94a3b8; white-space: nowrap; transition: color 0.15s; }
.req-tab:hover { color: #475569; }
.req-tab.active { border-bottom-color: #2563eb; color: #1d4ed8; }
.req-card { overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.req-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.req-head-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.req-head-line h4 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.req-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; }
.req-badge.tone-soft-slate { color: #475569; }
.req-changes { padding: 0.125rem 0.5rem; border-radius: 999px; background: #eff6ff; font-size: 0.625rem; font-weight: 600; color: #1d4ed8; }
.req-when { margin: 0.25rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.req-section { padding: 1rem; }
.req-section + .req-section { border-top: 1px solid #f1f5f9; }
.req-section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.req-section-head h5 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #334155; }
.req-op { padding: 0.125rem 0.5rem; border-radius: 0.375rem; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; }
.req-nodiff { margin: 0; font-size: 0.875rem; font-style: italic; color: #94a3b8; }
.req-diff { display: grid; gap: 0.75rem; margin: 0; }
.req-diff-item { min-width: 0; padding: 0.75rem; border: 1px solid #f1f5f9; border-radius: 0.5rem; background: rgba(248, 250, 252, 0.6); }
.req-diff-item dt { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #64748b; }
.req-diff-item dd { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 0.5rem; margin: 0.5rem 0 0; font-size: 0.75rem; }
.req-diff-item dd > div { min-width: 0; }
.req-diff-label { display: block; font-size: 0.625rem; font-weight: 600; text-transform: uppercase; color: #94a3b8; }
.req-diff-label.proposed { color: #059669; }
.req-diff-before, .req-diff-after { display: block; margin-top: 0.125rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.req-diff-before { color: #64748b; }
.req-diff-after { font-weight: 500; color: #1e293b; }
.req-diff-arrow { padding-top: 1rem; color: #cbd5e1; }
.req-more { margin-top: 0.75rem; border: 1px solid #f1f5f9; border-radius: 0.5rem; }
.req-more summary { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; list-style: none; cursor: pointer; font-size: 0.75rem; font-weight: 500; color: #64748b; }
.req-more summary::-webkit-details-marker { display: none; }
.req-more summary:hover { color: #334155; }
.req-more summary .chevron { transition: transform 0.15s; }
.req-more[open] summary .chevron { transform: rotate(180deg); }
.req-more-body { padding: 0.75rem; border-top: 1px solid #f1f5f9; }
.req-notes { margin-top: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid #f1f5f9; border-radius: 0.5rem; background: #f8fafc; }
.req-notes-title { margin: 0; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #94a3b8; }
.req-notes-text { margin: 0.25rem 0 0; font-size: 0.875rem; color: #475569; white-space: pre-wrap; }
.req-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--line); background: rgba(248, 250, 252, 0.7); }
.req-decide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.req-decide p { margin: 0; font-size: 0.75rem; color: #64748b; }
.req-decide-buttons { display: flex; gap: 0.5rem; }
.req-reject-btn, .req-approve-btn, .req-reject-confirm { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-radius: 0.5rem; font-size: 0.75rem; font-weight: 500; }
.req-reject-btn { border: 1px solid #fecaca; background: #fff; color: #dc2626; }
.req-reject-btn:hover { background: #fef2f2; }
.req-approve-btn { border: 0; background: #059669; color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.req-approve-btn:hover { background: #047857; }
.req-reject-btn:disabled, .req-approve-btn:disabled { opacity: 0.5; }
.req-reject { padding: 0.75rem; border: 1px solid #fee2e2; border-radius: 0.5rem; background: #fef2f2; }
.req-reject label { display: block; font-size: 0.75rem; font-weight: 500; color: #991b1b; }
.req-reject label span { font-weight: 400; color: #dc2626; }
.req-reject textarea { min-height: 0; margin-top: 0.375rem; padding: 0.5rem 0.75rem; border-color: #fecaca; border-radius: 0.375rem; font-size: 0.875rem; color: #334155; }
.req-reject textarea:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #f87171; }
.req-reject-hint { margin: 0.25rem 0 0; font-size: 0.6875rem; color: #dc2626; }
.req-reject-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
.req-reject-confirm { border: 0; background: #dc2626; color: #fff; }
.req-reject-confirm:hover { background: #b91c1c; }
.req-reject-confirm:disabled { cursor: not-allowed; opacity: 0.6; }
.req-reviewed { margin: 0; padding: 0.5rem 1rem; border-top: 1px solid #f1f5f9; text-align: right; font-size: 0.6875rem; color: #94a3b8; }
@media (min-width: 640px) {
  .doc-list > li { padding: 0.75rem 1rem; }
  .req-tabs-wrap { padding: 0.5rem 1.25rem 0; }
  .req-diff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .doc-uploader { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
  .doc-uploader .doc-hint { grid-column: 1 / -1; }
  .doc-attach { width: auto; }
}

/* Formulario de ficha */
.form-page { min-height: 100vh; background: var(--bg); }
.form-top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: #fff; }
.form-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(64rem, calc(100% - 2rem)); height: 4rem; margin: 0 auto; }
.form-top-inner.narrow { width: min(48rem, calc(100% - 2rem)); }
.form-title { margin: 0; font-size: 1rem; font-weight: 600; color: #0f172a; }
.form-subtitle { margin: 0; font-size: 0.75rem; color: var(--muted); }
.form-save { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.875rem; color: #334155; transition: background-color 0.15s; }
.form-save:hover { background: #f8fafc; }
.form-save:disabled { opacity: 0.5; }
.role-band { border-bottom: 1px solid #fde68a; background: #fffbeb; }
.role-band-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; width: min(64rem, calc(100% - 2rem)); margin: 0 auto; padding: 0.5rem 0; }
.role-band-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #b45309; }
.role-band-input { width: auto; padding: 0.375rem 0.5rem; border: 1px solid #fcd34d; border-radius: 0.5rem; background: #fff; font-size: 0.75rem; color: #334155; }
.role-band-input.wide { width: 11rem; }
.role-band-note { font-size: 0.75rem; color: #d97706; }
.form-wrap { width: min(1280px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0; }
.form-nav { width: 14rem; top: 120px; }
.form-main > div[id] { scroll-margin-top: 8rem; }
.form-bottom { display: flex; justify-content: flex-end; gap: 0.75rem; padding-bottom: 2rem; }
.form-bottom .form-save { padding: 0.5rem 1rem; }
.form-toast { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50; display: flex; align-items: center; gap: 0.75rem; max-width: 24rem; padding: 0.875rem 1.25rem; border-radius: 0.75rem; box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2); font-size: 0.875rem; font-weight: 500; color: #fff; }
.form-toast.ok { background: #16a34a; }
.form-toast.error { background: #dc2626; }
.form-toast .icon { flex-shrink: 0; }
.toast-close { display: inline-flex; margin-left: 0.5rem; padding: 0; border: 0; background: transparent; color: inherit; opacity: 0.7; }
.toast-close:hover { opacity: 1; }
.sc { /*overflow: hidden; */border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); transition: box-shadow 0.15s; margin-bottom:1rem}
.sc:hover { box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1); }
.sc.open { border-color: #cbd5e1; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.sc-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 1rem 1.25rem; border: 0; background: transparent; text-align: left; transition: background-color 0.15s; }
.sc-toggle:hover { background: #f8fafc; }
.sc.open .sc-toggle { background: #f1f5f9; }
.sc-title { display: flex; align-items: center; gap: 0.625rem; }
.sc-icon { display: inline-flex; padding: 0.375rem; border-radius: 0.5rem; background: #f1f5f9; color: #64748b; transition: background-color 0.15s, color 0.15s; }
.sc.open .sc-icon { background: #fee2e2; color: #dc2626; }
.sc-name { font-size: 0.875rem; font-weight: 600; color: #334155; }
.sc.open .sc-name { color: #0f172a; }
.sc-right { display: flex; align-items: center; gap: 0.5rem; }
.sc-expand { font-size: 0.625rem; font-weight: 500; color: #94a3b8; }
.sc-chevron { display: inline-flex; padding: 0.25rem; border-radius: 0.375rem; color: #94a3b8; }
.sc.open .sc-chevron { background: #fef2f2; color: #ef4444; }
.sc-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid #f1f5f9; }
.sc-inner { padding-top: 1rem; }
.only-ajj { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: 999px; background: #fee2e2; font-size: 0.75rem; font-weight: 500; color: #b91c1c; }
.f-label { display: block; margin-bottom: 0.375rem; font-size: 0.75rem; font-weight: 500; color: #475569; }
.f-label-inline { font-size: 0.75rem; font-weight: 500; color: #475569; }
.f-label-soft { font-weight: 400; color: #94a3b8; }
.f-req { margin-left: 0.125rem; color: #ef4444; }
.f-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.875rem; color: #0f172a; }
.f-input::placeholder { color: #94a3b8; }
.f-input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #ef4444; }
.f-input.readonly, .f-input:disabled { border-color: #f1f5f9; background: #f8fafc; color: #64748b; cursor: not-allowed; }
.f-input.no-resize { resize: none; }
textarea.f-input { min-height: 0; resize: vertical; }
.pr-10 { padding-right: 2.5rem; }
.relative { position: relative; }
.mb-4 { margin-bottom: 1rem; }
.m0 { margin: 0 !important; }
.f-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.f-grid-4 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.f-grid-5 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.f-hint { margin: 0.25rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.f-hint.dark { color: var(--muted); }
.f-hint-top { margin: 0 0 0.75rem; font-size: 0.75rem; color: #94a3b8; }
.f-caps { display: block; margin-bottom: 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #475569; }
.f-caps.mb-1 { margin-bottom: 0.25rem; }
.f-caps-p { margin: 0 0 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #475569; }
.f-caps-p.soft { color: var(--muted); }
.f-soft-box { padding: 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(248, 250, 252, 0.6); }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.form-stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.crm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.level-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.pick-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0.75rem; border: 2px solid var(--line); border-radius: 0.75rem; background: #fff; text-align: left; transition: all 0.15s; }
.pick-card:hover { border-color: #cbd5e1; }
.pick-label { font-size: 0.875rem; font-weight: 600; color: #334155; }
.pick-desc { font-size: 0.75rem; line-height: 1.25; color: #94a3b8; }
.pick-card.pick-blue { border-color: #3b82f6; background: #eff6ff; }
.pick-blue .pick-label { color: #1d4ed8; }
.pick-card.pick-emerald { border-color: #10b981; background: #ecfdf5; }
.pick-emerald .pick-label { color: #047857; }
.pick-card.pick-amber { border-color: #f59e0b; background: #fffbeb; }
.pick-amber .pick-label { color: #b45309; }
.pick-card.pick-slate { border-color: #64748b; background: #f8fafc; }
.pick-slate .pick-label { color: #334155; }
.hier-box { display: flex; flex-direction: column; gap: 1.25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; }
.hier-warning { margin: 0 0 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; font-size: 0.75rem; color: #b45309; }
.hier-rel { display: flex; flex-direction: column; gap: 1rem; padding-top: 0.75rem; border-top: 1px solid #f1f5f9; }
.hier-rel-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 600; color: #475569; }
.hier-letter { display: flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.hier-letter.tone-soft-amber { background: #fef3c7; color: #b45309; }
.hier-letter.tone-soft-blue { background: #dbeafe; color: #1d4ed8; }
.hier-letter.tone-soft-slate { background: #e2e8f0; color: #334155; }
.f-warn-text { margin: 0.375rem 0 0; font-size: 0.75rem; color: #d97706; }
.linea-stack { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }
.linea-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 2px solid var(--line); border-radius: 0.75rem; background: #fff; transition: all 0.15s; }
.linea-row:hover { border-color: #cbd5e1; }
.linea-check { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; padding: 0; border: 2px solid #cbd5e1; border-radius: 0.25rem; background: #fff; color: #fff; }
.linea-check:hover { border-color: #94a3b8; }
.linea-row.on.linea-slate { border-color: #94a3b8; background: #f8fafc; }
.linea-row.on.linea-blue { border-color: #60a5fa; background: #eff6ff; }
.linea-row.on.linea-teal { border-color: #2dd4bf; background: #f0fdfa; }
.linea-row.on.linea-emerald { border-color: #34d399; background: #ecfdf5; }
.linea-check.on.linea-slate { border-color: #64748b; background: #64748b; }
.linea-check.on.linea-blue { border-color: #3b82f6; background: #3b82f6; }
.linea-check.on.linea-teal { border-color: #14b8a6; background: #14b8a6; }
.linea-check.on.linea-emerald { border-color: #10b981; background: #10b981; }
.linea-middle { display: flex; flex: 1; align-items: center; gap: 0.5rem; min-width: 0; }
.linea-input { flex: 1; min-width: 0; width: auto; padding: 0.25rem 0.5rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.875rem; }
.linea-input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #60a5fa; }
.linea-name { flex: 1; padding: 0; border: 0; background: transparent; text-align: left; font-size: 0.875rem; font-weight: 600; color: #334155; }
.linea-name:hover { color: #0f172a; }
.linea-plus { display: inline-flex; flex-shrink: 0; padding: 0.25rem; border: 0; border-radius: 0.25rem; background: transparent; color: #3b82f6; }
.linea-plus:hover { background: #eff6ff; color: #1d4ed8; }
.cs { position: relative; }
.cs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.375rem; }
.cs-new { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border: 0; border-radius: 0.375rem; background: transparent; font-size: 0.75rem; font-weight: 500; color: #2563eb; }
.cs-new:hover { background: #eff6ff; color: #1d4ed8; }
.cs-field { position: relative; display: flex; align-items: center; }
.cs-lupa { display: inline-flex; padding: 0.25rem; border: 0; border-radius: 0.375rem; background: transparent; color: #94a3b8; flex-shrink: 0; }
.cs-field .cs-lupa { position: absolute; top: 50%; right: 0.625rem; transform: translateY(-50%); }
.cs-lupa:hover { background: #f1f5f9; color: #334155; }
.cs-spin { display: inline-block; width: 1rem; height: 1rem; border: 2px solid #60a5fa; border-top-color: transparent; border-radius: 999px; animation: spin 1s linear infinite; }
.cs-drop { position: absolute; z-index: 50; width: 100%; max-height: 14rem; margin-top: 0.25rem; overflow: hidden auto; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1); }
.cs-drop.fixed { position: fixed; z-index: 9999; margin-top: 0; max-height: 13rem; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15); }
.cs-drop.cs-empty { padding: 0.75rem 1rem; border-color: #fde68a; }
.cs-result { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0.625rem 1rem; border: 0; border-bottom: 1px solid #f1f5f9; background: transparent; text-align: left; transition: background-color 0.15s; }
.cs-result:last-child { border-bottom: 0; }
.cs-result:hover { background: #eff6ff; }
.cs-name { overflow: hidden; width: 100%; font-size: 0.875rem; font-weight: 500; color: #1e293b; text-overflow: ellipsis; white-space: nowrap; }
.cs-meta { display: flex; gap: 0.75rem; margin-top: 0.125rem; font-size: 0.75rem; color: #94a3b8; }
.cs-empty-text { margin: 0 0 0.5rem; font-size: 0.875rem; font-weight: 500; color: #b45309; }
.cs-create { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.625rem; border: 0; border-radius: 0.5rem; background: #eff6ff; font-size: 0.75rem; font-weight: 500; color: #2563eb; }
.cs-create:hover { background: #dbeafe; color: #1d4ed8; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.5rem; }
.cs-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; border: 1px solid var(--line); border-radius: 999px; background: #f1f5f9; font-size: 0.75rem; font-weight: 500; color: #334155; }
.cs-chip-x { display: inline-flex; margin-left: 0.125rem; padding: 0; border: 0; background: transparent; color: #94a3b8; }
.cs-chip-x:hover { color: #ef4444; }
.qc-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); }
.qc-dialog { display: flex; flex-direction: column; overflow: hidden; width: 100%; max-width: 32rem; max-height: 90vh; border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); outline: none; }
.qc-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.qc-title { display: flex; align-items: center; gap: 0.5rem; }
.qc-title h3 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.qc-x { display: inline-flex; padding: 0.25rem; border: 0; border-radius: 0.25rem; background: transparent; color: #94a3b8; }
.qc-x:hover { color: #475569; }
.qc-body { display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; padding: 1rem 1.25rem; }
.qc-note { margin: 0; font-size: 0.75rem; color: var(--muted); }
.qc-note .strong { display: inline; font-weight: 500; color: inherit; }
.qc-grid-2 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.qc-grid-2.fixed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qc-label { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 500; color: #475569; }
.qc-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.875rem; }
.qc-input::placeholder { color: #94a3b8; }
.qc-input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #3b82f6; }
.qc-phone { display: flex; gap: 0.5rem; }
.qc-input.qc-prefix { flex-shrink: 0; width: 7rem; padding: 0.5rem; }
.qc-phone .qc-input:not(.qc-prefix) { flex: 1; }
.qc-error { margin: 0; font-size: 0.75rem; color: #ef4444; }
.qc-foot { display: flex; flex-shrink: 0; align-items: center; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1.25rem; border-top: 1px solid #f1f5f9; background: #f8fafc; }
.qc-cancel { padding: 0.375rem 0.75rem; border: 0; border-radius: 0.5rem; background: transparent; font-size: 0.875rem; color: #475569; }
.qc-cancel:hover { background: #f1f5f9; }
.qc-create { padding: 0.375rem 1rem; border: 0; border-radius: 0.5rem; background: #2563eb; font-size: 0.875rem; font-weight: 500; color: #fff; }
.qc-create:hover { background: #1d4ed8; }
.qc-create:disabled { opacity: 0.6; }
.logo-block-form { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid #f1f5f9; }
.logo-upload { display: flex; align-items: flex-start; gap: 1rem; }
.logo-preview { display: flex; flex-shrink: 0; align-items: center; justify-content: center; overflow: hidden; width: 6rem; height: 4rem; border: 2px dashed var(--line); border-radius: 0.75rem; background: #f8fafc; }
.logo-preview img { max-width: 100%; max-height: 100%; padding: 0.25rem; object-fit: contain; }
.logo-empty { width: 1.75rem; height: 1.75rem; color: #cbd5e1; }
.logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.logo-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.875rem; font-weight: 500; color: #334155; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.logo-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.logo-remove { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; border: 1px solid #fecaca; border-radius: 0.5rem; background: #fff; font-size: 0.875rem; font-weight: 500; color: #dc2626; }
.logo-remove:hover { background: #fef2f2; }
.f-error-text { margin: 0; font-size: 0.75rem; color: #dc2626; }
.copy-fiscal { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border: 1px solid #bfdbfe; border-radius: 0.5rem; background: #eff6ff; font-size: 0.75rem; font-weight: 500; color: #2563eb; transition: all 0.15s; }
.copy-fiscal:hover { border-color: #60a5fa; background: #dbeafe; color: #1e40af; }
.f-locked { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; font-size: 0.875rem; color: #475569; }
.f-locked .icon, .f-warn-box .icon { flex-shrink: 0; margin-top: 0.125rem; }
.eye-btn { position: absolute; top: 50%; right: 0.625rem; display: inline-flex; padding: 0; border: 0; background: transparent; color: #94a3b8; transform: translateY(-50%); }
.eye-btn:hover { color: #475569; }
.f-warn-box { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.625rem 0.75rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; font-size: 0.875rem; color: #92400e; }
.f-warn-box.plain { color: #b45309; }
.cert-ok { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border: 1px solid #bbf7d0; border-radius: 0.5rem; background: #f0fdf4; color: #16a34a; }
.cert-name { flex: 1; overflow: hidden; font-size: 0.875rem; font-weight: 500; color: #166534; text-overflow: ellipsis; white-space: nowrap; }
.cert-link, .cert-remove { display: inline-flex; padding: 0.25rem; border: 0; border-radius: 0.25rem; background: transparent; color: #15803d; }
.cert-remove { color: #16a34a; }
.cert-remove:hover { color: #ef4444; }
.cert-drop { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.25rem 1rem; border: 2px dashed var(--line); border-radius: 0.5rem; text-align: center; cursor: pointer; transition: all 0.15s; }
.cert-drop:hover { border-color: #60a5fa; background: rgba(239, 246, 255, 0.3); }
.cert-drop.busy { background: #f8fafc; }
.cert-drop-icon { width: 1.75rem; height: 1.75rem; color: #94a3b8; }
.cert-drop-title { margin: 0; font-size: 0.875rem; font-weight: 500; color: #475569; }
.cert-drop-hint { margin: 0.125rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.f-internal { padding: 1rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; }
.f-internal-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; color: #d97706; }
.f-internal-head span { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #b45309; }
.f-sub-box { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; }
.f-sub-box.white { gap: 0.75rem; background: #fff; }
.f-sub-box > .f-caps-p { margin: 0; }
.f-sub-head { display: flex; align-items: center; gap: 0.5rem; }
.f-check-row { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; user-select: none; font-size: 0.875rem; font-weight: 500; color: #334155; }
.f-check { width: 1rem; height: 1rem; padding: 0; accent-color: #2563eb; }
.f-top-sep { padding-top: 1.25rem; border-top: 1px solid #f1f5f9; }
.phone-input { display: flex; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; }
.phone-input:focus-within { border-color: transparent; box-shadow: 0 0 0 2px #60a5fa; }
.phone-prefix { display: flex; flex-shrink: 0; align-items: center; gap: 0.25rem; padding: 0 0.625rem; border: 0; border-right: 1px solid var(--line); background: #f8fafc; font-size: 0.875rem; font-weight: 500; white-space: nowrap; color: #334155; }
select.phone-prefix { appearance: none; cursor: pointer; }
.phone-prefix:hover { background: #f1f5f9; }
.phone-flag { font-size: 1rem; line-height: 1; }
.phone-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #475569; }
.phone-number { flex: 1; min-width: 0; width: auto; padding: 0.5rem 0.75rem; border: 0; border-radius: 0; background: #fff; font-size: 0.875rem; color: #1e293b; }
.phone-number:focus { outline: none; }
.phone-number::placeholder { color: #94a3b8; }
.phone-dropdown { position: absolute; z-index: 99999; overflow: hidden; width: 260px; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.phone-search-wrap { padding: 0.5rem; border-bottom: 1px solid #f1f5f9; }
.phone-search { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.625rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; }
.phone-search:focus-within { border-color: transparent; box-shadow: 0 0 0 2px #60a5fa; }
.phone-search input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; font-size: 0.875rem; color: #334155; }
.phone-search input:focus { outline: none; }
.phone-list { max-height: 14rem; overflow-y: auto; }
.phone-option { display: flex; align-items: center; gap: 0.625rem; width: 100%; padding: 0.5rem 0.75rem; border: 0; background: transparent; text-align: left; font-size: 0.875rem; color: #334155; }
.phone-option:hover { background: #f8fafc; }
.phone-option.active { background: #eff6ff; color: #1d4ed8; }
.phone-option-flag { flex-shrink: 0; width: 1.5rem; font-size: 1rem; line-height: 1; text-align: center; }
.phone-unknown { font-size: 0.75rem; color: #cbd5e1; }
.phone-option-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-option-code { flex-shrink: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: #94a3b8; }
.phone-empty { padding: 1rem 0.75rem; text-align: center; font-size: 0.875rem; color: #94a3b8; }
.choose-page { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); }
.choose-body { display: flex; flex: 1; align-items: center; justify-content: center; padding: 3rem 1rem; }
.choose-inner { width: 100%; max-width: 42rem; }
.choose-head { margin-bottom: 2.5rem; text-align: center; }
.choose-head h2 { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 700; color: #0f172a; }
.choose-head p { margin: 0; font-size: 0.875rem; color: var(--muted); }
.choose-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.choose-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2.5rem; border: 2px solid var(--line); border-radius: 1rem; background: #fff; color: inherit; text-decoration: none; transition: all 0.2s; }
.choose-card:hover { box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1); }
.choose-blue:hover { border-color: #3b82f6; box-shadow: 0 0 0 2px #3b82f6, 0 10px 15px -3px rgba(15, 23, 42, 0.1); }
.choose-red:hover { border-color: #ef4444; box-shadow: 0 0 0 2px #ef4444, 0 10px 15px -3px rgba(15, 23, 42, 0.1); }
.choose-green:hover { border-color: #16a34a; box-shadow: 0 0 0 2px #16a34a, 0 10px 15px -3px rgba(15, 23, 42, 0.1); }
.choose-logo { display: flex; align-items: center; justify-content: center; height: 5rem; }
.choose-logo img { width: auto; height: 5rem; object-fit: contain; }
.choose-fallback { width: 3rem; height: 3rem; color: #cbd5e1; }
.choose-text { text-align: center; }
.choose-name { margin: 0 0 0.25rem; font-size: 1.25rem; font-weight: 700; color: #0f172a; }
.choose-desc { margin: 0; font-size: 0.875rem; color: var(--muted); }
/* Bloques internos del formulario */
.icon-fill { fill: currentColor; }
.blk-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.blk-stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.blk-stack-sm:empty, .blk-stack:empty { display: none; }
.blk-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.375rem; background: #fff; font-size: 0.875rem; color: #1e293b; transition: box-shadow 0.15s; }
.blk-input::placeholder { color: #94a3b8; }
.blk-input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #3b82f6; }
.blk-label { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 500; color: #475569; }
.blk-empty { margin: 0; padding: 0.5rem 0; text-align: center; font-size: 0.875rem; font-style: italic; color: #94a3b8; }
.blk-hint { margin: 0.25rem 0 0; font-size: 0.75rem; font-style: italic; color: #94a3b8; }
.blk-error { margin: 0; font-size: 0.75rem; color: #dc2626; }
.blk-add { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.625rem 0.75rem; border: 2px dashed var(--line); border-radius: 0.5rem; background: transparent; font-size: 0.875rem; color: #64748b; transition: all 0.15s; }
.blk-add:hover { border-color: #60a5fa; background: rgba(239, 246, 255, 0.3); color: #2563eb; }
.blk-add-row { display: flex; gap: 0.5rem; }
.blk-add-row .blk-add.grow { flex: 1; }
.blk-add.amber { width: auto; gap: 0.375rem; }
.blk-add.amber:hover { border-color: #fbbf24; background: rgba(255, 251, 235, 0.3); color: #d97706; }
.blk-notice { display: flex; gap: 0.75rem; padding: 0.75rem 1rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; }
.blk-notice-icon { flex-shrink: 0; margin-top: 0.125rem; color: #f59e0b; }
.blk-notice p { margin: 0; font-size: 0.875rem; line-height: 1.625; color: #92400e; }
.blk-pending { margin: 0; padding: 0.5rem 0.75rem; border: 1px solid #fde68a; border-radius: 0.25rem; background: #fffbeb; font-size: 0.75rem; color: #d97706; }
.blk-count { display: flex; align-items: center; gap: 0.5rem; padding-top: 0.25rem; }
.blk-count-icon { flex-shrink: 0; color: #22c55e; }
.blk-count-text { margin: 0; font-size: 0.75rem; color: #64748b; }
.blk-person { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; }
.blk-index { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; margin-top: 1.25rem; border-radius: 999px; background: #eff6ff; font-size: 0.75rem; font-weight: 700; color: #2563eb; }
.blk-person-body { display: flex; flex: 1; flex-direction: column; gap: 0.5rem; min-width: 0; }
.blk-person .blk-row-actions { margin-top: 1.25rem; }
.blk-row-actions { display: flex; flex-shrink: 0; align-items: center; gap: 0.25rem; }
.blk-icon-btn { display: inline-flex; padding: 0.25rem; border: 0; border-radius: 0.25rem; background: transparent; color: #94a3b8; transition: color 0.15s; }
.blk-icon-btn.blue:hover { color: #2563eb; }
.blk-icon-btn.red:hover { color: #ef4444; }
.blk-icon-btn.amber:hover { color: #d97706; }
.blk-icon-btn:disabled, .blk-save:disabled { opacity: 0.6; }
.blk-save { padding: 0.25rem 0.625rem; border: 0; border-radius: 0.25rem; background: #2563eb; font-size: 0.75rem; color: #fff; transition: background-color 0.15s; }
.blk-save:hover { background: #1d4ed8; }
.blk-star { display: inline-flex; padding: 0.25rem 0.5rem; border: 0; border-radius: 0.25rem; background: transparent; color: #64748b; transition: all 0.15s; }
.blk-star:hover { background: #eff6ff; color: #2563eb; }
.blk-card { /*overflow: hidden;*/ border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; transition: border-color 0.15s; padding: .5rem; margin: .5rem;}
.blk-card.soft { background: rgba(248, 250, 252, 0.5); }
.blk-card.pad { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; overflow: visible; }
.blk-card.principal { border-color: #93c5fd; background: rgba(239, 246, 255, 0.4); }
.blk-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 1rem; border-bottom: 1px solid #f1f5f9; background: #fff; }
.blk-head.plain { padding: 0; border: 0; background: transparent; }
.blk-head-left { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.blk-head-left .icon { flex-shrink: 0; }
.blk-head-title { overflow: hidden; font-size: 0.875rem; font-weight: 500; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.blk-placeholder { font-weight: 400; font-style: italic; color: #94a3b8; }
.blk-body { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem 1rem; }
.blk-grid-2 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.blk-grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.blk-grid-4 > .blk-span-all { grid-column: 1 / -1; }
.blk-grid-4 > .blk-span-2 { grid-column: span 2; }
.blk-grid-2 > .blk-span-2 { grid-column: 1 / -1; }
.blk-section { padding-top: 0.75rem; border-top: 1px solid #f1f5f9; }
.blk-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.blk-caps { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #64748b; }
.blk-copy-link { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0; border: 0; background: transparent; font-size: 0.75rem; color: #94a3b8; transition: color 0.15s; }
.blk-copy-link:hover { color: #d97706; }
.blk-pill { display: inline-flex; flex-shrink: 0; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; }
.blk-pill.red { background: #fee2e2; color: #b91c1c; }
.blk-pill.amber { background: #fef3c7; color: #b45309; }
.blk-pill.slate { background: #f1f5f9; color: #475569; }
.blk-pill.blue { background: #dbeafe; color: #1d4ed8; }
.blk-x3 { font-size: 0.75rem; color: #64748b; }
.blk-switch-row { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; user-select: none; }
.blk-switch-row > span { font-size: 0.875rem; font-weight: 500; color: #334155; }
.blk-switch { position: relative; flex-shrink: 0; width: 2.5rem; height: 1.25rem; border-radius: 999px; background: #cbd5e1; transition: background-color 0.15s; }
.blk-switch.on { background: #2563eb; }
.blk-switch-knob { position: absolute; top: 0.125rem; left: 0.125rem; width: 1rem; height: 1rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15); transition: transform 0.15s; }
.blk-switch.on .blk-switch-knob { transform: translateX(1.25rem); }
.blk-body.loose { gap: 1rem; }
.blk-hint.plain { margin: 0; }
.blk-label.soft { font-weight: 400; color: #64748b; }
.blk-label.tight { margin-bottom: 0.125rem; }
.blk-label.inline { display: flex; align-items: center; gap: 0.25rem; }
.blk-section-head.flush { margin-bottom: 0; }
.blk-caps.inline { display: flex; align-items: center; gap: 0.375rem; }
.blk-link-blue { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border: 0; border-radius: 0.25rem; background: transparent; font-size: 0.75rem; font-weight: 500; color: #2563eb; transition: all 0.15s; }
.blk-link-blue:hover { background: #eff6ff; color: #1d4ed8; }
.blk-slot { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; }
.blk-slot-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.blk-slot-top .blk-label { margin-bottom: 0.375rem; }
.blk-grow { flex: 1; }
.blk-slot-del { flex-shrink: 0; margin-top: 1rem; }
.blk-days { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.blk-day { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.75rem; font-weight: 600; color: #64748b; transition: all 0.15s; cursor: pointer; }
.blk-day input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
button.blk-switch-row { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.blk-day:hover { border-color: #93c5fd; color: #2563eb; }
.blk-day.on { border-color: #2563eb; background: #2563eb; color: #fff; }
.blk-hours { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.blk-hours.midday { padding-left: 0.75rem; border-left: 2px solid #dbeafe; }
.blk-time { width: 6rem; }
.blk-dash { padding-bottom: 0.5rem; font-size: 0.875rem; color: #94a3b8; }
.blk-midday-toggle { padding-bottom: 0.25rem; }
.blk-switch.sm { width: 2.25rem; background: #e2e8f0; cursor: pointer; }
.blk-switch.sm.on { background: #2563eb; }
.blk-switch.sm.on .blk-switch-knob { transform: translateX(1rem); }
.blk-switch-row.sm { gap: 0.5rem; }
.blk-switch-row.sm > span { font-size: 0.75rem; font-weight: 400; color: #475569; }
.blk-ct { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.375rem; background: #fff; }
.blk-ct-head { display: flex; align-items: center; justify-content: space-between; }
.blk-ct-head .blk-row-actions { margin-left: 0.5rem; }
.blk-ct-name { overflow: hidden; font-size: 0.75rem; font-weight: 500; color: #64748b; text-overflow: ellipsis; white-space: nowrap; }
.blk-icon-btn.tight { padding: 0.125rem; }
.blk-grid-2.tight { gap: 0.5rem; }
.blk-add.small { gap: 0.375rem; padding: 0.5rem; border-width: 1px; border-color: #cbd5e1; border-radius: 0.375rem; font-size: 0.75rem; }
.blk-grid-4 > .blk-span-2.sm-only { grid-column: auto; }
@media (min-width: 640px) { .blk-grid-4 > .blk-span-2.sm-only { grid-column: span 2; } }
.min-w-0 { min-width: 0; }
.resize-y { resize: vertical; }
.blk-stack.loose { gap: 1rem; }
.blk-grid-2.loose { gap: 1rem; }
.ute-msg { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid; border-radius: 0.5rem; font-size: 0.875rem; }
.ute-msg .icon { flex-shrink: 0; margin-top: 0.125rem; }
.ute-msg.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.ute-msg.success { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.ute-total { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; font-size: 0.75rem; color: #475569; }
.ute-total.bad { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.ute-empty { margin: 0; padding: 1.25rem 1rem; border: 1px dashed var(--line); border-radius: 0.5rem; text-align: center; font-size: 0.875rem; color: #94a3b8; }
.ute-part { padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; }
.ute-part-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.ute-part-name { display: flex; align-items: flex-start; gap: 0.5rem; min-width: 0; }
.ute-part-name > .icon { flex-shrink: 0; margin-top: 0.125rem; }
.ute-part-title { overflow: hidden; margin: 0; font-size: 0.875rem; font-weight: 500; color: #1e293b; text-overflow: ellipsis; white-space: nowrap; }
.ute-part-cif { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.ute-part-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.ute-part-grid .blk-input:disabled { background: #f8fafc; color: #64748b; }
.ute-icon-danger { display: inline-flex; padding: 0.25rem; border: 0; border-radius: 0.25rem; background: transparent; color: #94a3b8; transition: all 0.15s; }
.ute-icon-danger.lg { padding: 0.375rem; }
.ute-icon-danger:hover { background: #fef2f2; color: #dc2626; }
.ute-icon-danger:disabled { opacity: 0.5; }
.ute-search { position: relative; }
.ute-search-icon { position: absolute; top: 50%; left: 0.75rem; display: inline-flex; color: #94a3b8; transform: translateY(-50%); pointer-events: none; }
.ute-search-input { padding-left: 2.25rem; padding-right: 2.25rem; }
.ute-search-spin { position: absolute; top: 50%; right: 0.75rem; display: inline-flex; color: #3b82f6; transform: translateY(-50%); }
.ute-inactive { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.75rem; color: #475569; }
.ute-results { position: absolute; z-index: 30; width: 100%; max-height: 14rem; margin-top: 0.25rem; overflow-y: auto; padding: 0.25rem 0; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1); }
.ute-results-empty { margin: 0; padding: 0.75rem; font-size: 0.875rem; color: #64748b; }
.ute-result { display: flex; align-items: flex-start; gap: 0.5rem; width: 100%; padding: 0.5rem 0.75rem; border: 0; background: transparent; text-align: left; transition: background-color 0.15s; }
.ute-result:hover { background: #eff6ff; }
.ute-result-plus { flex-shrink: 0; margin-top: 0.125rem; color: #2563eb; }
.ute-result-name { display: block; overflow: hidden; font-size: 0.875rem; font-weight: 500; color: #1e293b; text-overflow: ellipsis; white-space: nowrap; }
.ute-result-meta { display: block; font-size: 0.75rem; color: #94a3b8; }
.ute-footer { display: flex; justify-content: flex-end; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.ute-primary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 0; border-radius: 0.5rem; background: #2563eb; font-size: 0.875rem; font-weight: 500; color: #fff; transition: background-color 0.15s; }
.ute-primary.lg { padding: 0.5rem 1rem; }
.ute-primary:hover { background: #1d4ed8; }
.ute-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ute-note { margin: 0; font-size: 0.75rem; }
.ute-note.blue { color: #1d4ed8; }
.ute-note.amber { color: #b45309; }
.ute-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.ute-top-actions { display: flex; align-items: center; gap: 0.5rem; }
.ute-refresh { display: inline-flex; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; color: #64748b; transition: background-color 0.15s; }
.ute-refresh:hover { background: #f8fafc; }
.ute-caption { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.ute-caption.dark { color: #64748b; }
.ute-loading { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 2rem 1rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; font-size: 0.875rem; color: #64748b; }
.ute-none { margin: 0; padding: 0.5rem 0; font-size: 0.875rem; color: #94a3b8; }
.ute-empty-box { padding: 2rem 1rem; border: 1px dashed var(--line); border-radius: 0.5rem; text-align: center; }
.ute-empty-box p { margin: 0; font-size: 0.875rem; color: #94a3b8; }
.ute-empty-icon { display: block; width: 1.5rem; height: 1.5rem; margin: 0 auto 0.5rem; color: #cbd5e1; }
.ute-blue { flex-shrink: 0; color: #3b82f6; }
.ute-status { flex-shrink: 0; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 11px; font-weight: 500; }
.ute-status.lg { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.ute-status.green { background: #dcfce7; color: #15803d; }
.ute-status.blue { background: #dbeafe; color: #1d4ed8; }
.ute-status.red { background: #fee2e2; color: #b91c1c; }
.ute-status.slate { background: #e2e8f0; color: #334155; }
.ute-ro { padding: 1rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; }
.ute-ro-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.ute-ro-title { display: flex; align-items: flex-start; gap: 0.625rem; min-width: 0; }
.ute-ro-title > .icon, .ute-date > .icon { flex-shrink: 0; margin-top: 0.125rem; }
.ute-ro-name { overflow: hidden; margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; text-overflow: ellipsis; white-space: nowrap; }
.ute-date { display: flex; align-items: flex-start; gap: 0.5rem; }
.ute-date-value { margin: 0; font-size: 0.875rem; color: #334155; }
.ute-obs { margin: 0.75rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--line); font-size: 0.875rem; white-space: pre-wrap; color: #475569; }
.ute-sep { margin-top: 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.ute-ro .ute-sep { margin-top: 1rem; }
.ute-h5 { margin: 0 0 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #64748b; }
.ute-history { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ute-history-item { padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; font-size: 0.875rem; }
.ute-history-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.ute-history-name { font-weight: 500; color: #334155; }
.ute-history-pct { font-weight: 600; color: #334155; }
.ute-history-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.25rem; font-size: 0.75rem; color: #64748b; }
.ute-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; }
.ute-editor-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-bottom: 1px solid #f1f5f9; }
.ute-editor-toggle { display: flex; flex: 1; align-items: center; gap: 0.5rem; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.ute-editor-toggle > .icon { flex-shrink: 0; }
.ute-editor-name { flex: 1; overflow: hidden; min-width: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; text-overflow: ellipsis; white-space: nowrap; }
.ute-editor-body { display: flex; flex-direction: column; gap: 1.25rem; padding: 1rem; }
.ute-editor-body > div:empty { display: none; }
.ute-integrity { display: flex; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; font-size: 0.875rem; color: #92400e; }
.ute-integrity > .icon { flex-shrink: 0; margin-top: 0.125rem; }
.ute-integrity ul { margin: 0.25rem 0 0; padding-left: 1rem; }
.ute-new { display: flex; flex-direction: column; gap: 1.25rem; padding: 1rem; border: 1px solid #bfdbfe; border-radius: 0.75rem; background: rgba(239, 246, 255, 0.3); }
.ute-new-title { display: flex; align-items: center; gap: 0.5rem; }
.ute-new-title h4 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.ute-new-sep { padding-top: 1rem; border-top: 1px solid #dbeafe; }
.ute-new-actions { display: flex; justify-content: flex-end; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid #dbeafe; }
.ute-cancel { padding: 0.5rem 0.75rem; border: 0; border-radius: 0.5rem; background: transparent; font-size: 0.875rem; font-weight: 500; color: #475569; }
.ute-cancel:hover { background: #fff; }
@media (min-width: 640px) { .ute-part-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pk-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.pk-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(4px); }
.pk-dialog { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 28rem; max-height: 70vh; border-radius: 1rem; background: #fff; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); outline: none; }
.pk-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.pk-title { display: flex; align-items: center; gap: 0.625rem; }
.pk-title h3 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.pk-x { display: inline-flex; padding: 0.25rem; border: 0; border-radius: 0.5rem; background: transparent; color: #94a3b8; transition: all 0.15s; }
.pk-x:hover { background: #f1f5f9; color: #475569; }
.pk-list { display: flex; flex: 1; flex-direction: column; gap: 0.375rem; overflow-y: auto; padding: 0.75rem; }
.pk-empty { margin: 0; padding: 1.5rem 0; text-align: center; font-size: 0.875rem; font-style: italic; color: #94a3b8; }
.pk-item { display: flex; align-items: flex-start; gap: 0.75rem; width: 100%; padding: 0.75rem 1rem; border: 1px solid transparent; border-radius: 0.75rem; background: transparent; text-align: left; transition: all 0.15s; }
.pk-item:hover { border-color: #bfdbfe; background: #eff6ff; }
.pk-avatar { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 999px; background: #f1f5f9; color: #64748b; transition: all 0.15s; }
.pk-item:hover .pk-avatar { background: #dbeafe; color: #2563eb; }
.pk-body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pk-name, .pk-meta { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.pk-name { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.pk-meta { font-size: 0.75rem; color: #64748b; }
.pk-phone { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.pk-source { align-self: flex-start; margin-top: 0.25rem; padding: 0.125rem 0.375rem; border-radius: 0.25rem; background: #f1f5f9; font-size: 0.75rem; color: #64748b; transition: all 0.15s; }
.pk-item:hover .pk-source { background: #dbeafe; color: #2563eb; }
.pk-copy { flex-shrink: 0; margin-top: 0.25rem; color: #cbd5e1; transition: color 0.15s; }
.pk-item:hover .pk-copy { color: #3b82f6; }

/* Paneles de X3 y del portal */
.imp-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; }
.imp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.875rem 1rem; border-bottom: 1px solid #f1f5f9; }
.imp-head-left { display: flex; align-items: center; gap: 0.625rem; }
.imp-head-icon { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.5rem; background: #fef2f2; color: #dc2626; }
.imp-head h3 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.imp-head p { margin: 0.125rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.imp-reset { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.625rem; border: 0; border-radius: 0.5rem; background: transparent; font-size: 0.75rem; font-weight: 500; color: #64748b; transition: all 0.15s; }
.imp-reset .icon { width: 0.875rem; height: 0.875rem; }
.imp-reset:hover { background: #f1f5f9; color: #334155; }
.imp-reset:disabled { opacity: 0.5; }
.imp-body { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; }
.imp-body > div:empty { display: none; }
.imp-form { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; }
.imp-search { position: relative; flex: 1; min-width: 0; }
.imp-search-icon { position: absolute; top: 50%; left: 0.75rem; transform: translateY(-50%); color: #94a3b8; }
.imp-input { width: 100%; padding: 0.5rem 0.75rem 0.5rem 2.25rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875rem; text-transform: uppercase; color: #1e293b; }
.imp-input::placeholder { font-family: system-ui, sans-serif; text-transform: none; color: #94a3b8; }
.imp-input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #ef4444; }
.imp-input:disabled { cursor: not-allowed; background: #f8fafc; }
.imp-submit { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 0; border-radius: 0.5rem; background: #1e293b; font-size: 0.875rem; font-weight: 500; color: #fff; transition: background-color 0.15s; }
.imp-submit:hover { background: #0f172a; }
.imp-submit:disabled { cursor: not-allowed; opacity: 0.5; }
.imp-error { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 0.75rem; border: 1px solid #fecaca; border-radius: 0.5rem; background: #fef2f2; font-size: 0.875rem; color: #b91c1c; }
.imp-error-text { display: flex; align-items: flex-start; gap: 0.5rem; }
.imp-error-icon { margin-top: 0.125rem; }
.imp-error-close { display: inline-flex; padding: 0.125rem; border: 0; border-radius: 0.125rem; background: transparent; color: #f87171; }
.imp-error-close:hover { background: #fee2e2; color: #dc2626; }
.imp-result { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.75rem; border: 1px solid #a7f3d0; border-radius: 0.5rem; background: #ecfdf5; color: #065f46; }
.imp-result-icon { margin-top: 0.125rem; }
.imp-result-title { margin: 0; font-size: 0.875rem; font-weight: 600; }
.imp-result-line { margin: 0.25rem 0 0; font-size: 0.75rem; color: #047857; }
.imp-result-line.warn { font-weight: 500; color: #b45309; }
.imp-preview { display: flex; flex-direction: column; gap: 0.75rem; }
.imp-customer { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.875rem; border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(248, 250, 252, 0.6); }
.imp-customer-left { display: flex; align-items: flex-start; gap: 0.625rem; min-width: 0; }
.imp-customer-icon { margin-top: 0.125rem; color: #94a3b8; }
.imp-customer-name, .imp-customer-name2 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.imp-customer-name { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.imp-customer-name2 { font-size: 0.75rem; color: #64748b; }
.imp-customer-meta { margin: 0.25rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.imp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #475569; }
.imp-strong { font-weight: 600; color: inherit; }
.imp-customer-meta .imp-strong { font-weight: 500; color: #475569; }
.imp-medium { font-weight: 500; }
.imp-capitalize { text-transform: capitalize; }
.imp-state { padding: 0.125rem 0.5rem; border-radius: 999px; background: #e2e8f0; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #475569; }
.imp-state.on { background: #d1fae5; color: #047857; }
.imp-structure { padding: 0.875rem; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; }
.imp-structure-head { display: flex; align-items: center; gap: 0.5rem; }
.imp-structure-head p { margin: 0; font-size: 0.75rem; font-weight: 600; color: #334155; }
.imp-blue { color: #3b82f6; }
.imp-red { color: #ef4444; }
.imp-structure-grid { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
.imp-structure-cell { padding: 0.625rem 0.75rem; border-radius: 0.5rem; background: #f8fafc; }
.imp-caps { margin: 0; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #94a3b8; }
.imp-structure-line { margin: 0.25rem 0 0; font-size: 0.75rem; color: #334155; }
.imp-structure-line.muted { color: #475569; }
.imp-structure-line.soft { color: #64748b; }
.imp-structure-note { margin: 0.25rem 0 0; font-size: 0.6875rem; color: #64748b; }
.imp-participants { display: flex; flex-direction: column; gap: 0.25rem; margin: 0.25rem 0 0; padding: 0; list-style: none; }
.imp-participants li { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.75rem; color: #475569; }
.imp-total { margin: 0.5rem 0 0; padding-top: 0.375rem; border-top: 1px solid var(--line); font-size: 0.75rem; color: #475569; }
.imp-structure-warning { margin: 0.5rem 0 0; font-size: 0.6875rem; color: #b45309; }
.imp-lists { display: grid; gap: 0.75rem; }
.imp-list { border: 1px solid var(--line); border-radius: 0.75rem; }
.imp-list-head { display: flex; align-items: center; justify-content: space-between; padding: 0.625rem 0.75rem; border-bottom: 1px solid #f1f5f9; }
.imp-list-title { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 600; color: #475569; }
.imp-list-title .icon { width: 0.875rem; height: 0.875rem; }
.imp-count { padding: 0.125rem 0.5rem; border-radius: 999px; background: #f1f5f9; font-size: 0.625rem; font-weight: 500; color: #64748b; }
.imp-list-empty { margin: 0; padding: 1rem 0.75rem; font-size: 0.75rem; font-style: italic; color: #94a3b8; }
.imp-items { max-height: 14rem; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.imp-items li { padding: 0.625rem 0.75rem; }
.imp-items li + li { border-top: 1px solid #f1f5f9; }
.imp-items li.inactive { opacity: 0.55; }
.imp-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.imp-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.625rem; font-weight: 600; color: #64748b; }
.imp-item-name { font-size: 0.75rem; font-weight: 500; color: #334155; }
.imp-item-dept { font-size: 0.6875rem; color: #94a3b8; }
.imp-default { padding: 0.125rem 0.375rem; border-radius: 999px; background: #eff6ff; font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; color: #2563eb; }
.imp-inactive { padding: 0.125rem 0.375rem; border-radius: 999px; background: #f1f5f9; font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; color: #64748b; }
.imp-item-text { margin: 0.25rem 0 0; font-size: 0.75rem; line-height: 1.625; color: #475569; }
.imp-item-contact { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin: 0.25rem 0 0; font-size: 0.6875rem; color: #94a3b8; }
.imp-item-contact span { display: inline-flex; align-items: center; gap: 0.25rem; }
.imp-item-contact .icon { width: 0.75rem; height: 0.75rem; }
.imp-warnings { padding: 0.625rem 0.75rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; }
.imp-warnings-title { display: flex; align-items: center; gap: 0.375rem; margin: 0; font-size: 0.75rem; font-weight: 600; color: #92400e; }
.imp-warnings-title .icon { width: 0.875rem; height: 0.875rem; }
.imp-warnings ul { display: flex; flex-direction: column; gap: 0.25rem; margin: 0.375rem 0 0; padding-left: 1.25rem; list-style: disc; font-size: 0.75rem; color: #b45309; }
.imp-confirm { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 0.75rem; padding: 0.75rem; border: 1px solid #dbeafe; border-radius: 0.5rem; background: rgba(239, 246, 255, 0.6); }
.imp-confirm-title { margin: 0; font-size: 0.75rem; font-weight: 600; color: #1e40af; }
.imp-confirm-text { margin: 0.125rem 0 0; font-size: 0.6875rem; color: #2563eb; }
.imp-import { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 0; border-radius: 0.5rem; background: #dc2626; font-size: 0.875rem; font-weight: 500; color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); transition: background-color 0.15s; }
.imp-import:hover { background: #b91c1c; }
.imp-import:disabled { cursor: not-allowed; opacity: 0.6; }

.mon-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.mon-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.mon-title { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 1.125rem; font-weight: 600; color: #0f172a; }
.mon-sub { margin: 0.25rem 0 0; font-size: 0.875rem; color: #475569; }
.mon-refresh { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 0.5rem; background: #fff; font-size: 0.875rem; font-weight: 500; color: #334155; }
.mon-refresh:hover { background: #f8fafc; }
.mon-refresh:disabled { cursor: wait; opacity: 0.6; }
.mon-note { margin: 0.75rem 0 0; font-size: 0.75rem; color: #64748b; }
.mon-datasets + .mon-note { margin-top: 1rem; }
.mon-loading { margin: 1rem 0 0; padding: 1rem; border-radius: 0.5rem; background: #f8fafc; font-size: 0.875rem; color: #334155; }
.mon-error { display: flex; gap: 0.5rem; margin-top: 1rem; padding: 1rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; font-size: 0.875rem; color: #451a03; }
.mon-error p { margin: 0; }
.mon-status { margin-top: 1rem; padding: 1rem; border: 1px solid; border-radius: 0.5rem; }
.mon-status h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.mon-status > p { margin: 0.25rem 0 0; font-size: 0.875rem; }
.mon-status > p.mon-small { margin-top: 0.5rem; font-size: 0.75rem; }
.mon-ok { border-color: #bbf7d0; background: #f0fdf4; color: #14532d; }
.mon-warning { border-color: #fde68a; background: #fffbeb; color: #451a03; }
.mon-critical { border-color: #fecaca; background: #fef2f2; color: #7f1d1d; }
.mon-unknown { border-color: #cbd5e1; background: #f1f5f9; color: #1e293b; }
.mon-alerts { margin-top: 1rem; }
.mon-alerts h3 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #0f172a; }
.mon-alerts ul { display: flex; flex-direction: column; gap: 0.25rem; margin: 0.5rem 0 0; padding-left: 1.25rem; list-style: disc; font-size: 0.875rem; color: #334155; }
.mon-losses { display: grid; gap: 0.75rem; margin: 0.5rem 0 0; font-size: 0.875rem; }
.mon-losses dd, .mon-dataset-grid dd, .mon-run-times dd, .mon-counts dd { margin: 0; }
.mon-losses dd.strong { font-weight: 600; }
.mon-thresholds { margin: 1rem 0 0; font-size: 0.75rem; color: #475569; }
.mon-datasets { display: grid; gap: 1rem; margin-top: 0.75rem; }
.mon-dataset { padding: 1rem; border: 1px solid var(--line); border-radius: 0.5rem; }
.mon-dataset-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.mon-dataset-head h3 { margin: 0; font-size: 1rem; font-weight: 600; color: #0f172a; }
.mon-badge { padding: 0.25rem 0.5rem; border: 1px solid; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 500; }
.mon-dataset-grid { display: grid; gap: 0.5rem; margin: 0.75rem 0 0; font-size: 0.875rem; color: #334155; }
.mon-dataset-grid dt { font-size: 0.75rem; color: #64748b; }
.mon-norun { margin: 0.75rem 0 0; font-size: 0.875rem; color: #475569; }
.mon-run { margin: 0.75rem 0 0; font-size: 0.875rem; font-weight: 500; color: #1e293b; }
.mon-run-times { display: grid; gap: 0.5rem; margin: 0.5rem 0 0; font-size: 0.75rem; color: #475569; }
.mon-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.75rem 0 0; font-size: 0.75rem; color: #475569; }
.mon-counts dd { font-weight: 600; color: #0f172a; }

.pol-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1); }
.pol-loading { padding: 2rem; }
.pol-loading > div { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.875rem; color: #64748b; }
.pol-red { color: #dc2626; }
.pol-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.pol-head-left { display: flex; align-items: flex-start; gap: 0.75rem; }
.pol-head-icon { display: inline-flex; padding: 0.5rem; border-radius: 0.5rem; background: #fef2f2; color: #dc2626; }
.pol-head h2 { margin: 0; font-size: 1rem; font-weight: 600; color: #0f172a; }
.pol-head p { margin: 0.125rem 0 0; font-size: 0.75rem; color: #64748b; }
.pol-reload { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.75rem; font-weight: 500; color: #475569; }
.pol-reload .icon { width: 0.875rem; height: 0.875rem; }
.pol-reload:hover { background: #f8fafc; }
.pol-reload:disabled { opacity: 0.5; }
.pol-body { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }
.pol-messages { display: flex; flex-direction: column; gap: 1rem; }
.pol-msg { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.625rem 0.75rem; border: 1px solid; border-radius: 0.5rem; font-size: 0.875rem; }
.pol-msg .icon { margin-top: 0.125rem; }
.pol-msg.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.pol-msg.success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.pol-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.pol-stat { padding: 0.625rem; border: 1px solid var(--line); border-radius: 0.5rem; }
.pol-stat-label { margin: 0; font-size: 0.625rem; letter-spacing: 0.025em; text-transform: uppercase; color: #94a3b8; }
.pol-stat-value { margin: 0; font-size: 0.875rem; font-weight: 600; color: #334155; }
.pol-label { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 500; color: #475569; }
.pol-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.875rem; color: #1e293b; }
.pol-input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #ef4444; }
.pol-input:disabled { background: #f8fafc; }
.pol-list { display: flex; flex-direction: column; align-items: stretch; gap: 0.75rem; max-height: 52vh; overflow-y: auto; padding-right: 0.25rem; }
.pol-group { display: block; flex: none; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; }
.pol-group > .pol-rows { display: block; }
.pol-group > summary { cursor: pointer; padding: 0.625rem 0.75rem; background: #f8fafc; font-size: 0.875rem; font-weight: 600; color: #334155; user-select: none; }
.pol-group-count { margin-left: 0.25rem; font-size: 0.75rem; font-weight: 400; color: #94a3b8; }
.pol-row { display: grid; gap: 0.5rem; padding: 0.625rem 0.75rem; }
.pol-row + .pol-row { border-top: 1px solid #f1f5f9; }
.pol-field, .pol-key { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.pol-field { font-size: 0.875rem; font-weight: 500; color: #334155; }
.pol-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.625rem; color: #94a3b8; }
.pol-toggle { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: #475569; }
.pol-toggle .icon { width: 0.875rem; height: 0.875rem; }
.pol-toggle.off { color: #cbd5e1; }
.pol-check { width: 1rem; height: 1rem; accent-color: #dc2626; }
.pol-check:disabled { opacity: 0.4; }
.pol-mode { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: #64748b; }
.pol-select { width: 100%; padding: 0.375rem 0.5rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.75rem; }
.pol-select:disabled { background: #f8fafc; color: #cbd5e1; }
.pol-transport { margin: 0; font-size: 0.625rem; color: #94a3b8; }
.pol-empty { margin: 0; padding: 1.5rem 0.75rem; border: 1px dashed var(--line); border-radius: 0.5rem; text-align: center; font-size: 0.875rem; color: #94a3b8; }
.pol-warning { padding: 0.625rem 0.75rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; font-size: 0.75rem; line-height: 1.625; color: #92400e; }
.pol-footer { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.pol-grow { flex: 1; }
.pol-save { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 0; border-radius: 0.5rem; background: #dc2626; font-size: 0.875rem; font-weight: 500; color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.pol-save:hover { background: #b91c1c; }
.pol-save:disabled { cursor: not-allowed; opacity: 0.5; }
@media (min-width: 640px) {
  .imp-form { flex-direction: row; }
  .imp-structure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .imp-confirm { flex-direction: row; align-items: center; }
  .mon-panel { padding: 1.5rem; }
  .mon-losses, .mon-dataset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-run-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mon-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pol-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pol-row { grid-template-columns: minmax(180px, 1fr) 90px 90px 180px; align-items: center; }
  .pol-transport { grid-column: 1 / 5; }
  .pol-footer { flex-direction: row; align-items: flex-end; }
}
@media (min-width: 1024px) {
  .imp-lists, .mon-datasets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-losses { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .blk-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blk-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .f-grid-2, .f-grid-4, .f-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choose-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .f-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .f-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 639px) { .f-grid-2 > .span-2 { grid-column: auto; } }

@media (max-width: 1023px) { .detail-nav { display: none; } }
@media (max-width: 639px) {
  .vgrid-3, .vgrid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vgrid-2 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: 1 / -1; }
  .hide-xs { display: none; }
  .share-inner { flex-direction: column; }
  .x3-grid { grid-template-columns: 1fr; }
}

.pub-page { min-height: 100vh; background: #f8fafc; }
.pub-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.pub-top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.pub-top-inner, .pub-main { width: min(48rem, calc(100% - 2rem)); margin: 0 auto; }
.pub-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 4rem; }
.pub-brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.pub-brand-logo { height: 2.25rem; max-width: 7.5rem; object-fit: contain; }
.pub-brand-title { margin: 0; font-size: 0.875rem; font-weight: 600; color: #0f172a; line-height: 1.25; }
.pub-brand-sub { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.pub-actions { display: flex; align-items: center; gap: 0.5rem; }
.pub-toggle { display: flex; align-items: center; gap: 0.125rem; padding: 0.125rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #f8fafc; }
.pub-toggle button { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border: 0; border-radius: 0.375rem; background: transparent; font-size: 0.75rem; font-weight: 500; color: #64748b; }
.pub-toggle button.on { background: #fff; color: #1e293b; box-shadow: var(--shadow); }
.pub-toggle button:disabled { cursor: not-allowed; opacity: 0.5; }
.pub-save { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 0; border-radius: 0.5rem; background: #dc2626; font-size: 0.875rem; font-weight: 500; color: #fff; box-shadow: var(--shadow); }
.pub-save:hover { background: #b91c1c; }
.pub-save.ok { background: #16a34a; }
.pub-save.large { padding: 0.75rem 1.5rem; border-radius: 0.75rem; font-weight: 600; }
.pub-save:disabled { opacity: 0.6; }
.pub-main { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem 0 2rem; }
.pub-privacy { padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; font-size: 0.75rem; line-height: 1.625; color: #475569; }
.pub-privacy-title { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: 600; color: #334155; }
.pub-privacy p { margin: 0.25rem 0 0; }
.pub-privacy-meta { color: #94a3b8; }
.pub-banner { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.75rem 1rem; border: 1px solid; border-radius: 0.75rem; font-size: 0.875rem; }
.pub-banner.ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.pub-banner.info { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.pub-banner.err { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.pub-banner.warn { border-color: #fde68a; background: #fffbeb; color: #92400e; line-height: 1.625; }
.pub-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: var(--shadow); }
.pub-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; padding: 1rem 1.25rem; border: 0; border-bottom: 1px solid #f1f5f9; background: #f8fafc; text-align: left; }
.pub-card-head:hover { background: #f1f5f9; }
.pub-card-title { display: flex; align-items: center; gap: 0.75rem; }
.pub-card-title h2 { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.pub-card-body { padding: 1.25rem; }
.pub-lbl { display: block; margin-bottom: 0.375rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #64748b; }
.pub-view { margin: 0; min-height: 2.125rem; padding: 0.375rem 0; font-size: 0.875rem; color: #1e293b; }
.pub-view.pre { white-space: pre-wrap; }
.pub-view.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pub-mute { font-style: italic; color: #94a3b8; }
.pub-mute.sm { font-size: 0.75rem; }
.pub-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.875rem; color: #0f172a; }
.pub-input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #60a5fa; }
.pub-input::placeholder { color: #94a3b8; }
.pub-area { min-height: 6.25rem; resize: vertical; }
.pub-time { width: 7rem; }
.pub-link { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0; font-size: 0.875rem; color: #2563eb; text-decoration: none; }
.pub-link:hover { color: #1d4ed8; text-decoration: underline; }

.pub-link { color:var(--ink); font-weight:600; }
.pub-link:hover { color: var(--red);text-decoration:none }

.pub-map { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 0.125rem; font-size: 0.75rem; color: #94a3b8; text-decoration: none; }
.pub-map:hover { color: #2563eb; text-decoration: underline; }
.pub-grid-2, .pub-grid-3 { display: grid; gap: 1rem; }
.pub-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.pub-stack { display: flex; flex-direction: column; gap: 1rem; }
.pub-item { padding: 1rem; border: 1px solid #f1f5f9; border-radius: 0.75rem; background: rgba(248, 250, 252, 0.5); }
.pub-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }
.pub-caps { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: #64748b; }
.pub-caps.mb { margin: 0 0 0.75rem; }
.pub-row-actions { display: flex; align-items: center; gap: 0.25rem; }
.pub-add { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border: 1px solid #bfdbfe; border-radius: 0.5rem; background: #fff; font-size: 0.75rem; font-weight: 500; color: #2563eb; }
.pub-add:hover { background: #eff6ff; }
.pub-add.ghost { border: 0; padding: 0.25rem 0.5rem; }
.pub-rem, .pub-copy { display: inline-flex; padding: 0.375rem; border: 0; border-radius: 0.5rem; background: transparent; color: #94a3b8; }
.pub-rem:hover { background: #fef2f2; color: #ef4444; }
.pub-copy:hover { background: #fffbeb; color: #d97706; }
.pub-chk, .pub-chk-view { display: flex; align-items: center; gap: 0.75rem; }
.pub-chk { cursor: pointer; user-select: none; }
.pub-check { width: 1rem; height: 1rem; accent-color: #2563eb; }
.pub-pill { display: inline-flex; align-items: center; padding: 0.125rem 0.5rem; border-radius: 999px; background: #f1f5f9; font-size: 0.75rem; font-weight: 500; color: #64748b; }
.pub-pill.on { background: #dcfce7; color: #15803d; }
.pub-pill.warn { background: #fffbeb; font-size: 0.625rem; font-weight: 600; color: #b45309; }
.pub-fiscal { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.pub-logo { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid #f1f5f9; }
.pub-logo-row { display: flex; align-items: flex-start; gap: 1rem; }
.pub-logo-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.pub-hint { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.pub-sub { padding-top: 0.5rem; border-top: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 0.5rem; }
.pub-subitem { padding: 0.5rem; border: 1px solid #f1f5f9; border-radius: 0.5rem; background: #fff; }
.pub-inline { display: flex; align-items: center; gap: 0.5rem; }
.pub-ute-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.pub-ute-name { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.pub-ute-parts { overflow: hidden; border: 1px solid #f1f5f9; border-radius: 0.5rem; background: #fff; }
.pub-ute-part { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.pub-ute-part + .pub-ute-part { border-top: 1px solid #f1f5f9; }
.pub-ellip { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.pub-mono { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: #94a3b8; }
.pub-strong { flex-shrink: 0; font-weight: 600; color: #1e293b; }
.pub-lock { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0; padding: 0.5rem 0.75rem; border: 1px solid #dbeafe; border-radius: 0.5rem; background: #eff6ff; font-size: 0.75rem; color: #1e40af; }
.pub-auth { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 1px solid #f1f5f9; border-radius: 0.75rem; background: rgba(248, 250, 252, 0.5); }
.pub-auth-n { width: 1.25rem; flex-shrink: 0; font-size: 0.75rem; color: #94a3b8; }
.pub-grow { flex: 1; min-width: 0; }
.pub-roles { margin: 0.5rem 0 0; padding-left: 1.25rem; font-size: 0.75rem; color: #1d4ed8; }
.pub-store { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.pub-docs { margin: 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; }
.pub-docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; }
.pub-docs li + li { border-top: 1px solid #f1f5f9; }
.pub-doc-icon { display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; background: #eff6ff; color: #2563eb; }
.pub-doc-name { overflow: hidden; margin: 0; font-size: 0.875rem; font-weight: 500; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.pub-open { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border: 1px solid #bfdbfe; border-radius: 0.5rem; background: #fff; font-size: 0.75rem; font-weight: 600; color: #1d4ed8; }
.pub-open:hover { background: #eff6ff; }
.pub-open:disabled { cursor: not-allowed; opacity: 0.5; }
.pub-footer { display: flex; justify-content: flex-end; padding-bottom: 2rem; }
.pub-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.pub-missing { max-width: 24rem; text-align: center; }
.pub-missing-icon { display: flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 999px; background: #fee2e2; color: #ef4444; }
.pub-missing h1 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.pub-missing p { margin: 0; font-size: 0.875rem; color: #64748b; }
.span-3 { grid-column: span 3; }
@media (min-width: 640px) {
  .pub-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .pub-grid-2 > .span-2, .pub-grid-3 > .span-2, .pub-grid-3 > .span-3 { grid-column: auto; }
}

.grid-2_1_3{
  grid-template-columns: 1fr 4fr;
}
.telefono-grid{
  grid-template-columns: 97px 1fr;
}
.telefono-grid select,
.telefono-grid input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.f-sub-box2{
  display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;

}



.select-buscable {
    position: relative;
    width: 100%;
}

.select-buscable-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background: #fff;
}

.select-buscable-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}

.select-buscable-panel [data-select-busqueda] {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 0.4rem;
}

.select-buscable-lista {
    max-height: 14rem;
    overflow-y: auto;
}

.select-buscable-lista [data-select-opcion] {
    display: block;
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.select-buscable-lista [data-select-opcion]:hover {
    background: #f1f5f9;
}

.select-buscable [hidden] {
    display: none !important;
}
