/* Diseño compartido de todos los módulos autenticados de ENROQUE. */
.enroque-system { --brand-navy:#092854; --brand-olive:#092854; --brand-navy-light:#133b75; --brand-navy-dark:#061b3a; --bg-body:var(--ex-bg); --bg-card:var(--ex-card); --bg-sidebar:#092854; --text-main:var(--ex-ink); --text-muted:#7082a0; --text-light:#8296b5; --border-color:var(--ex-border); --en-primary-text:#092854; --en-soft:#f0f4f9; --radius-lg:16px; }
.enroque-system :is(h1,h2,h3,h4) { font-family:'Plus Jakarta Sans',Inter,sans-serif; }
.enroque-system .sst-header h1 { color:#092854; }
.enroque-system .card { border-color:var(--ex-border); border-radius:16px; background:var(--ex-card); box-shadow:none; }
.enroque-system .card:hover { box-shadow:none; }
.enroque-system .btn-primary,.enroque-system .inspection-execute { background:#092854; border-color:#092854; color:#fff; box-shadow:none; }
.enroque-system .btn-primary:hover,.enroque-system .inspection-execute:hover { background:#133b75; }
.enroque-system .module-featured:not(.tone-rose) { background:#092854!important; }
.enroque-system .module-summary > .card { border-top:4px solid var(--tone,#092854); }
.enroque-system .sidebar { min-height:0; background:#092854; }
.enroque-system .sidebar-nav { min-height:0; overscroll-behavior:contain; }
.enroque-system .sidebar.collapsed .sidebar-footer { display:none; }
.enroque-system .sidebar.collapsed .sidebar-footer-links { display:none; }
.enroque-system .sidebar.collapsed .sidebar-header > a { justify-content:center; }
.enroque-system .sidebar.collapsed .sidebar-header { padding-inline:12px; }
.enroque-system .sidebar.collapsed .brand-text { display:none; }
.enroque-system .sidebar.collapsed .menu-heading { display:block; height:1px; margin:15px 3px; padding:0; font-size:0; border:0; background:#ffffff19; overflow:hidden; }
.enroque-system .sidebar.collapsed .menu-heading:first-child { display:none; }
.enroque-system .sidebar.collapsed .nav-link { height:40px; min-height:40px; }
.enroque-system .sidebar-footer { flex:none; padding:12px; }
.system-sidebar-edge-toggle { position:fixed; top:80px; left:256px; z-index:65; display:flex; align-items:center; justify-content:center; width:22px; height:54px; padding:0; border:1px solid var(--ex-border); border-left:0; border-radius:0 10px 10px 0; background:var(--ex-card); color:#8296b5; box-shadow:2px 2px 4px #09285408; cursor:pointer; transition:left .3s ease; }
.system-sidebar-edge-toggle svg { width:15px; height:15px; transition:transform .2s ease; }
.system-sidebar-edge-toggle:hover { color:var(--ex-ink); background:var(--ex-bg); }
.system-sidebar-edge-toggle:focus-visible { outline:2px solid #8296b5; outline-offset:2px; }
.sidebar.collapsed ~ .system-sidebar-edge-toggle { left:80px; }
.sidebar.collapsed ~ .system-sidebar-edge-toggle svg { transform:rotate(180deg); }
.system-sidebar-backdrop { display:none; }
.system-sidebar-tooltip { position:fixed; z-index:100; max-width:260px; padding:9px 12px; border:1px solid #ffffff24; border-radius:9px; background:#041126; color:#fff; font-family:Inter,sans-serif; font-size:12px; font-weight:600; box-shadow:0 6px 20px #0003; pointer-events:none; }
.system-sidebar-tooltip[hidden] { display:none; }
.dark .enroque-system { --bg-sidebar:#000; --en-primary-text:#c0d6f4; --en-soft:#ffffff0c; --text-muted:#a0afc5; --text-light:#92a3be; }
.dark .enroque-system .sidebar { background:#000!important; border-right-color:#242424; }
.dark .enroque-system .sidebar-header,.dark .enroque-system .sidebar-nav,.dark .enroque-system .sidebar-footer { background:#000!important; border-color:#242424; }
.dark .enroque-system .nav-link { color:#d4d4d8; }
.dark .enroque-system .nav-link > :is(svg,i) { color:#a1a1aa; }
.dark .enroque-system .nav-link:hover { background:#171717; color:#fff; }
.dark .enroque-system .nav-link.active { background:#262626; color:#fff; }
.dark .enroque-system .nav-link.active > :is(svg,i) { color:#fff; }
.dark .enroque-system .sst-header h1,.dark .enroque-system .topbar-scope-chip svg { color:#dce5f2; }
.dark .enroque-system .system-sidebar-tooltip { background:#111; border-color:#333; }
/* Módulo Inspecciones: cabecera, resúmenes, catálogo y agenda. */
.inspections-page.content-container { width:100%; max-width:1600px; margin:auto; padding:32px; display:flex; flex-direction:column; gap:24px; min-width:0; }
.inspections-page .inspection-module-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; margin:0; padding:24px; border:1px solid var(--ex-border); border-radius:16px; background:var(--ex-card); }
.inspection-module-header h1 { margin:6px 0 2px; color:#092854; font-size:24px; font-weight:800; line-height:1.4; letter-spacing:-.035em; }
.inspection-module-header p { margin:0; color:#7082a0; font-size:14px; line-height:1.65; }
.inspection-breadcrumb { display:flex; flex-wrap:wrap; align-items:center; gap:10px; color:#63723c; font-size:12px; font-weight:600; }
.inspection-breadcrumb > span:first-child { padding:3px 10px; border:1px solid #dce5f2; border-radius:99px; color:#092854; background:#f0f4f9; }
.inspection-breadcrumb > span + span::before { content:'•'; margin-right:10px; color:#94a3b8; }
.inspection-module-header .btn-primary { min-height:40px; border-radius:11px; gap:8px; padding:10px 16px!important; font-size:14px; }
.inspection-module-header .btn-primary svg { width:16px; height:16px; }
.inspections-page .module-summary { margin:0; gap:20px; }
.inspections-page .summary-inspecciones > .card { position:relative; padding:20px; min-height:150px; }
.inspections-page .module-summary .module-kpi-head h2,.inspections-page .module-summary .module-chart > h2 { font-family:Inter,sans-serif; font-size:11px; font-weight:700; letter-spacing:.025em; color:#8296b5; text-transform:uppercase; }
.inspections-page .module-kpi-value { font-family:'Plus Jakarta Sans',Inter,sans-serif; font-size:24px; color:#092854; font-weight:800; }
.inspections-page .module-kpi-detail,.inspections-page .module-chart-note { color:#8296b5; font-size:11px; line-height:1.6; margin-top:8px; }
.inspections-page .module-icon { width:36px; height:36px; border-radius:12px; background:#f0f4f9; color:#092854; }
.inspections-page .module-chart .module-empty { min-height:40px; margin:8px 0; padding:8px 10px; border:1px solid var(--ex-border); border-radius:11px; background:var(--ex-bg); font-size:12px; }
.inspections-page .module-line { margin-top:10px; background:transparent; border:0; }
.inspections-page .module-line svg { max-height:74px; }
.inspections-page .module-line-path { stroke:#092854; }
.inspections-page .module-line-area { fill:#63723c22; }
.inspections-page .module-summary .tone-emerald { --tone:#63723c; --tone-bg:#f4f6f0; }
.inspection-module-actions { display:flex; flex-wrap:wrap; gap:8px; }
.inspections-page .module-tab-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:6px; border:1px solid var(--ex-border); border-radius:16px; background:var(--ex-card); margin:0; }
.inspections-page .sst-tabs { border:0; margin:0; gap:4px; flex-wrap:wrap; overflow:visible; }
.inspections-page .sst-tabs button { display:inline-flex; align-items:center; gap:8px; padding:9px 16px; border:0; border-radius:11px; font-size:14px; color:#526581; font-weight:500; }
.inspections-page .sst-tabs button svg { width:16px; height:16px; }
.inspections-page .sst-tabs button.active { background:#092854; color:#fff; font-weight:700; box-shadow:none; }
.inspections-page .sst-tabs button.active svg { color:#cbd5b9; }
.inspection-template-search { position:relative; display:flex; align-items:center; min-width:0; width:256px; margin-left:auto; }
.inspection-template-search > svg { position:absolute; left:12px; width:14px; height:14px; color:#8296b5; pointer-events:none; }
.inspection-template-search input { width:100%; min-width:0; padding:8px 12px 8px 32px; border:1px solid var(--ex-border); border-radius:11px; background:var(--ex-bg); color:var(--ex-ink); font-family:Inter,sans-serif; font-size:12px; }
.inspection-template-search input::placeholder { color:#8296b5; }
.inspections-page .inspection-catalog-panel,.inspections-page .inspection-agenda-panel { margin:0; padding:24px; border:1px solid var(--ex-border); border-radius:16px; overflow:hidden; }
.inspection-panel-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #eef2f7; }
.inspection-panel-heading h2 { margin:0; color:#092854; font-size:16px; font-weight:700; }
.inspection-panel-heading p { margin:3px 0 0; color:#8296b5; font-size:12px; line-height:1.6; }
.inspection-count-badge { flex-shrink:0; padding:4px 11px; border:1px solid #cbd5b9; border-radius:99px; background:#f4f6f0; color:#4e5a2f; font-size:12px; font-weight:500; }
.inspection-count-badge.is-pending { border-color:#fde68a; background:#fffbeb; color:#d97706; border-radius:9px; }
.inspections-page .inspection-catalog { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.inspections-page .inspection-template.card { display:flex; flex-direction:column; gap:0; margin:0; min-width:0; padding:20px; border:1px solid var(--ex-border); border-radius:16px; background:#fbfcfe; box-shadow:none; }
.inspections-page .inspection-template:hover { border-color:#b8cbe5; background:var(--ex-card); }
.inspection-template-top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.inspection-template-tags { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
.inspection-template-category { padding:3px 7px; color:#092854; background:#eaf0f8; border-radius:5px; font-size:10px; }
.inspection-published { display:inline-flex; align-items:center; gap:4px; padding:3px 7px; border:1px solid #cbd5b9; color:#4e5a2f; background:#f4f6f0; border-radius:99px; font-size:10px; }
.inspection-published::before { content:''; width:5px; height:5px; border-radius:50%; background:#63723c; }
.inspections-page .inspection-template h2 { margin:0; color:#092854; font-family:Inter,sans-serif; font-size:13px; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
.inspections-page .inspection-template-meta { display:flex; flex-wrap:wrap; gap:10px; margin:10px 0 20px; color:#8296b5; font-size:11px; line-height:1.5; }
.inspection-template-meta > span:first-child { color:#5476a4; }
.inspection-template-meta > span + span::before { content:'•'; padding-right:10px; }
.inspection-template-buttons { display:flex; gap:8px; margin-top:auto; padding-top:14px; border-top:1px solid #e7edf6; }
.inspections-page .inspection-template-buttons button { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:1; min-width:0; min-height:34px; padding:7px 10px!important; border-radius:11px; font-size:12px; font-weight:500; }
.inspection-template-buttons button svg { width:14px; height:14px; }
.inspections-page .inspection-agenda-table { font-size:12px; color:#092854; min-width:1000px; }
.inspections-page .inspection-agenda-table th { color:#7082a0; font-size:11px; font-weight:600; letter-spacing:.02em; background:#f8fafc; }
.inspections-page .inspection-agenda-table :is(th,td) { padding:13px 12px; border-color:#e7edf6; }
.inspections-page .inspection-agenda-table td strong { color:#092854; font-size:12px; font-weight:600; line-height:1.5; }
.inspections-page .inspection-agenda-table td small { color:#8296b5; font-size:11px; }
.inspections-page .inspection-state { border-radius:99px; font-size:10px; padding:5px 10px; }
.inspection-table-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding-top:16px; margin-top:16px; border-top:1px solid #eef2f7; color:#7082a0; font-size:12px; }
.inspection-table-footer label { display:inline-flex; align-items:center; gap:8px; }
.inspection-table-footer select { width:65px; font-size:12px; padding:6px 8px; border:1px solid var(--ex-border); border-radius:8px; background:var(--ex-bg); color:var(--ex-ink); }
.inspection-table-pages { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.inspection-table-pages button { padding:7px 10px; min-width:32px; min-height:32px; border:1px solid var(--ex-border); border-radius:9px; color:#526581; }
.inspection-table-pages button[aria-current=page] { background:#092854; color:#fff; font-weight:700; border-color:#092854; }
.inspection-table-pages button:disabled { opacity:.45; cursor:default; }
.dark .enroque-system .inspection-module-header h1,.dark .enroque-system .inspection-panel-heading h2,.dark .enroque-system .inspection-template h2,.dark .enroque-system .module-kpi-value,.dark .enroque-system .inspection-agenda-table td strong { color:#dce5f2; }
.dark .enroque-system .inspection-template.card { background:#1c252e; }
.dark .enroque-system .inspection-panel-heading,.dark .enroque-system .inspection-template-buttons,.dark .enroque-system .inspection-agenda-table :is(th,td),.dark .enroque-system .inspection-table-footer { border-color:var(--ex-border); }
.dark .enroque-system .inspection-agenda-table thead,.dark .enroque-system .inspection-agenda-table th { background:#141a21; }
.dark .enroque-system .inspection-agenda-table { color:#dce5f2; }
@media(max-width:1100px) { .inspections-page.content-container { padding:24px; } .inspections-page .inspection-catalog { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:1024px) {
  .enroque-system .sidebar,.enroque-system .sidebar.collapsed { width:256px; transform:translateX(-100%); box-shadow:none; }
  .enroque-system .sidebar.mobile-open,.enroque-system .sidebar.collapsed.mobile-open { transform:translateX(0); box-shadow:16px 0 48px #0005; }
  .enroque-system .sidebar.collapsed .brand-text { display:flex; }
  .enroque-system .sidebar.collapsed .nav-item-text { display:block; }
  .enroque-system .sidebar.collapsed .menu-heading { display:block; height:auto; font-size:11px; padding:16px 12px 8px; margin:12px 0 0; background:none; border-top:1px solid #ffffff17; }
  .enroque-system .sidebar.collapsed .menu-heading:first-child { padding-top:4px; margin:0; border:0; }
  .enroque-system .sidebar.collapsed .sidebar-header { padding-inline:20px; }
  .enroque-system .sidebar.collapsed .sidebar-header > a { justify-content:flex-start; }
  .enroque-system .sidebar.collapsed .sidebar-footer-links { display:flex; }
  .enroque-system .sidebar.collapsed .nav-link { justify-content:flex-start; }
  .enroque-system .sidebar.mobile-open ~ .system-sidebar-backdrop { display:block; position:fixed; inset:0; z-index:55; background:#0006; backdrop-filter:blur(2px); }
  .enroque-system .sidebar ~ .main-wrapper,.enroque-system .sidebar.collapsed ~ .main-wrapper { margin-left:0!important; }
  .enroque-system .system-sidebar-tooltip { display:none; }
}
@media(max-width:760px) { .inspections-page .module-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .inspection-template-search { width:100%; margin:0; } }
@media(max-width:600px) {
  .inspections-page.content-container { padding:18px 14px; gap:18px; }
  .inspections-page .inspection-module-header,.inspections-page .inspection-catalog-panel,.inspections-page .inspection-agenda-panel { padding:20px; }
  .inspection-module-header h1 { font-size:22px; }
  .inspections-page .inspection-catalog { grid-template-columns:1fr; }
  .inspections-page .module-summary { grid-template-columns:1fr; }
  .inspections-page .sst-tabs button { font-size:12px; padding:9px 11px; }
  .inspection-module-actions { width:100%; }
  .inspection-module-actions .btn-primary { width:100%; }
}
@media print { .enroque-system .sidebar,.enroque-system .top-header,.system-sidebar-tooltip,.system-sidebar-backdrop,.inspection-template-search,.inspection-module-actions { display:none!important; } .enroque-system .main-wrapper { margin-left:0!important; } }

/* Ajustes de lectura del perfil y alineación de las tarjetas de Inspecciones. */
@media(min-width:640px){.enroque-system .topbar-profile-btn > span{display:block}.enroque-system .topbar-profile-btn strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
.inspections-page .summary-inspecciones > .card{justify-content:flex-start}
.inspections-page .summary-inspecciones [data-metric="completed-inspections"],.inspections-page .summary-inspecciones [data-chart="inspection-activity"]{border-top-color:#092854}
.inspections-page .summary-inspecciones [data-chart="inspection-compliance"]{border-top-color:#63723c}
.inspections-page .summary-inspecciones [data-metric="available-checklists"]{border-top-color:#64748b}
.inspections-page .module-kpi-main{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:12px}
.inspections-page .module-kpi-badge{padding:3px 7px;border-radius:5px;background:#f0f4f9;color:#526581;font-size:10px;font-weight:600}
.inspections-page [data-metric="available-checklists"] .module-kpi-badge{background:#fffbeb;color:#d97706}
.inspections-page .module-chart .module-plot-empty{min-height:36px;padding:8px 10px;margin-top:12px;border:1px solid var(--ex-border);border-radius:11px;background:var(--ex-bg);font-size:12px;line-height:1.5}
.inspections-page .module-plot-empty svg{width:16px;height:16px;color:#092854}
.inspections-page .module-line{margin-top:6px}
.inspections-page .module-line svg{height:52px;max-height:52px}
.dark .enroque-system .module-plot-empty svg{color:#dce5f2}

.enroque-system .topbar-profile-copy{display:none}
@media(min-width:640px){.enroque-system .topbar-profile-copy{display:block}}
@media(max-width:1024px){.enroque-system .sidebar.mobile-open ~ .system-sidebar-backdrop{left:256px}}

/* Catálogo de Plantillas: diseño conectado al catálogo autorizado. */
.template-page.content-container { width:100%; max-width:1600px; margin:auto; padding:32px; display:flex; flex-direction:column; gap:24px; min-width:0; }
.template-page .template-list-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px; margin:0; padding:24px; background:var(--ex-card); border:1px solid var(--ex-border); border-radius:16px; }
.template-page .template-list-header h1 { display:flex; align-items:center; gap:10px; margin:6px 0 2px; font-size:24px; font-weight:800; letter-spacing:-.035em; color:#092854; }
.template-page .template-list-header h1 span { padding:3px 9px; border:1px solid var(--ex-border); border-radius:99px; background:#f0f4f9; font-family:Inter,sans-serif; font-size:12px; font-weight:600; letter-spacing:0; color:#526581; }
.template-page .template-list-header p { margin:0; color:#7082a0; font-size:14px; line-height:1.65; }
.template-page .template-list-header .btn-primary { display:inline-flex; gap:8px; min-height:40px; border-radius:11px; padding:10px 16px!important; font-size:14px; }
.template-page .template-list-header .btn-primary svg { width:16px; height:16px; }
.template-page .module-summary { margin:0; gap:16px; }
.template-page .module-summary > .card { min-height:146px; padding:20px; justify-content:flex-start; }
.template-page .module-kpi-head h2 { color:#8296b5; font-family:Inter,sans-serif; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.025em; }
.template-page .module-icon { width:36px; height:36px; border-radius:12px; }
.template-page .tone-emerald { --tone:#63723c; --tone-bg:#f4f6f0; }
.template-page .tone-amber { --tone:#ff9f00; --tone-bg:#fffbeb; }
.template-page .tone-indigo { --tone:#092854; --tone-bg:#f0f4f9; }
.template-page .module-kpi-main { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:12px; }
.template-page .module-kpi-value { color:var(--tone); font-size:24px; font-weight:800; }
.template-page .tone-amber .module-kpi-value { color:var(--ex-ink); }
.template-page .module-kpi-badge { border-radius:5px; padding:3px 7px; font-size:10px; font-weight:600; color:#526581; background:#f0f4f9; }
.template-page .tone-emerald .module-kpi-badge { color:#4e5a2f; background:#f4f6f0; }
.template-page .module-kpi-detail { margin-top:8px; color:#8296b5; font-size:11px; line-height:1.6; }
.template-page .template-catalog-panel { padding:24px; background:var(--ex-card); border:1px solid var(--ex-border); border-radius:16px; min-width:0; }
.template-page .template-list-controls { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin:0 0 20px; }
.template-page .template-search-wrap { margin-bottom:0; width:380px; max-width:100%; }
.template-page .template-search-input { width:100%; border:1px solid var(--ex-border); border-radius:11px; background:var(--ex-bg); color:var(--ex-ink); padding:10px 12px 10px 40px; font-size:14px; }
.template-page .template-search-input::placeholder { color:#8296b5; }
.template-page #templateStatusFilter { max-width:100%; border:1px solid var(--ex-border); border-radius:11px; padding:8px 12px; color:var(--ex-ink); background:var(--ex-bg); font-size:12px; }
.template-page .template-list-card { border:0; border-radius:0; background:transparent; overflow:visible; }
.template-page .template-list-table { width:100%; min-width:1000px; border-collapse:collapse; font-family:Inter,sans-serif; color:var(--ex-ink); font-size:12px; }
.template-page .template-list-table :is(th,td) { padding:16px 12px; border-bottom:1px solid #eef2f7; vertical-align:middle; }
.template-page .template-list-table th { padding:13px 12px; background:#f8fafc; border-top:1px solid var(--ex-border); color:#7082a0; font-size:11px; font-weight:700; letter-spacing:.025em; text-transform:uppercase; white-space:nowrap; text-align:left; }
.template-page .template-list-table th:first-child { width:51%; }
.template-page .template-list-table th:last-child { text-align:right; }
.template-page .template-name-cell { display:flex; flex-direction:column; align-items:flex-start; gap:5px; width:100%; padding:0; text-align:left; }
.template-page .template-name-cell strong { color:var(--ex-ink); font-size:12px; font-weight:700; line-height:1.5; }
.template-page .template-name-cell > span { color:#7082a0; font-size:11px; line-height:1.6; }
.template-page .template-name-cell small { display:flex; gap:8px; flex-wrap:wrap; margin-top:3px; font-size:10px; }
.template-page .template-name-cell small b { padding:3px 8px; background:#f0f4f9; color:#526581; border-radius:5px; font-weight:600; }
.template-page .template-name-cell small b:first-child { color:#092854; }
.template-page .template-updated { color:#526581; white-space:nowrap; }
.template-page .template-version { display:inline-block; padding:3px 10px; border:1px solid var(--ex-border); border-radius:5px; background:#f0f4f9; color:#092854; font-weight:600; white-space:nowrap; }
.template-page .template-status { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--ex-border); border-radius:99px; padding:5px 10px; background:var(--ex-bg); color:#526581; font-size:10px; font-weight:600; white-space:nowrap; }
.template-page .template-status::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; }
.template-page .template-status.is-published { background:#f4f6f0; border-color:#cbd5b9; color:#4e5a2f; }
.template-page .template-status.is-draft { background:#fffbeb; border-color:#fde68a; color:#a35c05; }
.template-page .template-row-actions { display:flex; justify-content:flex-end; align-items:center; gap:4px; }
.template-page .template-row-actions .action-button { display:flex; align-items:center; justify-content:center; width:30px; height:30px; padding:6px; background:transparent; color:#7082a0; border-radius:8px; cursor:pointer; }
.template-page .template-row-actions .action-button:hover { background:var(--ex-bg); color:var(--ex-ink); }
.template-page .template-row-actions svg { width:16px; height:16px; }
.template-more-actions summary { list-style:none; }
.template-more-actions summary::-webkit-details-marker { display:none; }
.template-actions-popover { position:fixed; z-index:90; width:200px; padding:6px; border:1px solid var(--ex-border); border-radius:10px; background:var(--ex-card); box-shadow:0 8px 24px #09285420; }
.template-actions-popover button { display:flex; align-items:center; gap:8px; width:100%; padding:9px; color:var(--ex-ink); border-radius:6px; text-align:left; font-size:12px; }
.template-actions-popover button:hover { background:var(--ex-bg); }
.template-catalog-empty { display:flex; flex-direction:column; align-items:center; gap:16px; padding:64px 20px; color:#7082a0; text-align:center; font-size:14px; }
.template-table-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; padding-top:20px; color:#7082a0; font-size:12px; }
.template-table-footer > div,.template-table-footer label,.template-table-footer nav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.template-table-footer label { margin-left:10px; padding-left:10px; border-left:1px solid var(--ex-border); }
.template-table-footer select,.template-table-footer button { border:1px solid var(--ex-border); border-radius:8px; padding:7px 10px; color:var(--ex-ink); background:var(--ex-bg); }
.template-table-footer nav span { border-radius:8px; padding:8px 10px; background:#092854; color:#fff; font-weight:600; }
.template-table-footer button:disabled { opacity:.4; cursor:default; }
.dark .template-page .template-list-header h1,.dark .template-page .module-kpi-value { color:#dce5f2; }
.dark .template-page .template-list-table th { background:#141a21; }
.dark .template-page .template-list-table :is(th,td) { border-color:var(--ex-border); }
.dark .template-page .template-version,.dark .template-page .template-name-cell small b,.dark .template-page .template-list-header h1 span { background:#27313e; color:#c0d6f4; }
.dark .template-page .template-name-cell > span,.dark .template-page .template-updated { color:#a0afc5; }
@media(max-width:1100px) { .template-page.content-container { padding:24px; } }
@media(max-width:1024px) {
 .enroque-system .sidebar.collapsed .sidebar-footer { display:flex; }
 .sidebar ~ .system-sidebar-edge-toggle,.sidebar.collapsed ~ .system-sidebar-edge-toggle { left:0; }
 .sidebar ~ .system-sidebar-edge-toggle svg { transform:rotate(180deg); }
 .sidebar.mobile-open ~ .system-sidebar-edge-toggle { left:256px; }
 .sidebar.mobile-open ~ .system-sidebar-edge-toggle svg { transform:none; }
}
@media(max-width:900px) { .system-sidebar-edge-toggle { top:134px; } }
@media(max-width:760px) { .template-page .module-summary { grid-template-columns:1fr; } }
@media(max-width:600px) { .template-page.content-container { padding:18px 14px; gap:18px; } .template-page .template-list-header,.template-page .template-catalog-panel { padding:20px; } .template-page .template-list-header h1 { font-size:22px; } .template-page .template-list-header .btn-primary { width:100%; justify-content:center; } .template-page .template-search-wrap,.template-page #templateStatusFilter { width:100%; } }
@media(prefers-reduced-motion:reduce) { .system-sidebar-edge-toggle,.system-sidebar-edge-toggle svg { transition:none; } }
@media print { .system-sidebar-edge-toggle,.template-list-controls,.template-row-actions,.template-table-footer { display:none!important; } }

.dark .template-page .template-list-table tbody tr:hover { background:#ffffff05; }

/* Directorios de configuración. Comparten la paginación y las acciones del sistema. */
.configuration-directory { display:grid; gap:20px; min-width:0; }
.configuration-directory [hidden] { display:none; }
.configuration-directory-header,.configuration-directory-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.configuration-directory-header h2 { color:var(--en-primary-text); font-size:16px; font-weight:800; }
.configuration-directory-header p { color:var(--text-muted); font-size:12px; margin:2px 0 0; }
.configuration-company-actions { justify-content:flex-end; }
.configuration-directory-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.configuration-directory-search { display:block; position:relative; width:min(100%,320px); }
.configuration-directory-search svg { position:absolute; width:15px; height:15px; inset-inline-start:13px; top:50%; transform:translateY(-50%); color:var(--text-muted); pointer-events:none; }
.configuration-directory-search input { width:100%; padding-inline-start:36px; font-size:12px; }
.configuration-directory-controls .filter-control,.configuration-directory-search input { min-height:38px; border-radius:11px; }
.configuration-directory .config-button svg { width:15px; height:15px; flex:none; }
.configuration-company-toolbar { padding-bottom:8px; border-bottom:1px solid var(--border-color); }
.configuration-company-toolbar .configuration-directory-search { width:288px; max-width:100%; }
.configuration-company-tabs { display:flex; gap:8px; }
.configuration-company-tabs button { display:inline-flex; align-items:center; gap:7px; padding:7px 12px; min-height:34px; border:1px solid transparent; border-radius:10px; color:var(--text-secondary); font-size:12px; font-weight:650; }
.configuration-company-tabs button svg { width:15px; height:15px; }
.configuration-company-tabs button:hover,.configuration-company-tabs button[aria-pressed="true"] { background:var(--en-soft); color:var(--en-primary-text); border-color:var(--border-color); }
.configuration-company-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.configuration-company-metric { --metric-color:var(--en-primary-text); position:relative; overflow:hidden; padding:18px 20px; min-width:0; margin:0; }
.configuration-company-metric::before { content:''; position:absolute; inset:0 0 auto; height:4px; background:var(--metric-color); }
.configuration-company-metric[data-tone="pending"] { --metric-color:#b45309; }
.configuration-company-metric[data-tone="olive"] { --metric-color:#61733a; }
.configuration-company-metric h2 { color:var(--text-muted); text-transform:uppercase; font-size:11px; font-weight:800; letter-spacing:.045em; }
.configuration-company-metric strong { display:block; margin-top:8px; color:var(--metric-color); font-size:29px; font-weight:800; line-height:1.2; }
.configuration-directory .configuration-table-card { min-width:0; margin:0; padding:24px; }
.configuration-table-scroll { max-width:100%; }
.configuration-table { width:100%; min-width:720px; border-collapse:collapse; text-align:left; font-size:12px; }
.configuration-directory table.configuration-table :is(th,td) { padding:12px; vertical-align:middle; text-align:left; }
.configuration-directory table.configuration-table th { background:var(--bg-subtle,var(--bg-neutral)); border-block:1px solid var(--border-color); color:var(--text-muted); font-size:11px; font-weight:800; letter-spacing:.045em; text-transform:uppercase; white-space:nowrap; }
.configuration-directory table.configuration-table td { border-bottom:1px solid var(--border-light); color:var(--text-secondary); overflow-wrap:anywhere; }
.configuration-directory table.configuration-table tbody tr:last-child td { border-bottom:0; }
.configuration-table tbody tr:hover { background:var(--bg-subtle); }
.configuration-table td strong { color:var(--text-main); font-weight:750; }
.configuration-table td small { display:block; margin-top:3px; color:var(--text-muted); font-size:11px; }
.configuration-directory .configuration-table .configuration-table-actions { width:1%; text-align:right; white-space:nowrap; }
.configuration-row-actions { display:inline-flex; align-items:center; justify-content:flex-end; gap:4px; vertical-align:middle; }
.configuration-read-only { color:var(--text-muted); font-size:11px; }
.configuration-table td.configuration-table-message { padding:34px 12px; text-align:center; color:var(--text-muted); }
.configuration-table td.configuration-table-message[role="alert"] { color:var(--en-danger-text,#be123c); }
.configuration-company-name { display:flex; align-items:center; gap:10px; }
.configuration-company-logo { display:grid; place-items:center; flex:none; width:36px; height:36px; overflow:hidden; border:1px solid var(--border-color); border-radius:10px; background:var(--en-soft); color:var(--en-primary-text); font-size:11px; font-weight:800; }
.configuration-company-logo img { width:100%; height:100%; padding:3px; object-fit:contain; }
.configuration-record-code { font-family:ui-monospace,monospace; }
.configuration-table td .configuration-compliance { color:var(--en-primary-text); }
.configuration-role,.configuration-status { display:inline-flex; align-items:center; gap:5px; max-width:100%; padding:2px 8px; background:var(--en-soft); border:1px solid var(--border-color); border-radius:6px; color:var(--en-primary-text); font-size:11px; font-weight:750; }
.configuration-status { border-radius:999px; white-space:nowrap; color:var(--text-secondary); }
.configuration-status::before { content:''; width:5px; height:5px; flex:none; border-radius:50%; background:currentColor; }
.configuration-status[data-tone="active"] { background:#f2f5ed; border-color:#c7d3b5; color:#46592e; }
.configuration-status[data-tone="pending"] { background:#fff8e6; border-color:#f4d092; color:#92400e; }
.configuration-status[data-tone="danger"] { background:var(--en-danger-bg); color:var(--en-danger-text,#be123c); }
.configuration-table-card .table-pagination-host { margin-top:8px; }
.configuration-table-card .enroque-pagination { padding:12px 0 0; }
.configuration-users .user-access-dialog { width:min(1024px,100%); font-family:inherit; }
.configuration-users .user-access-avatar-wrap img { border-radius:15px; }
.configuration-users .user-access-model,.configuration-users .user-access-module-header>div:first-child>span { background:#f2f5ed; border-color:#c7d3b5; color:#46592e; }
.configuration-users .user-access-segments button.selected.is-edit { background:#61733a; }
html.dark .configuration-company-metric[data-tone="pending"] { --metric-color:#efb766; }
html.dark .configuration-company-metric[data-tone="olive"] { --metric-color:#b4c78c; }
html.dark .configuration-status[data-tone="active"],html.dark .configuration-users :is(.user-access-model,.user-access-module-header>div:first-child>span) { background:#151515; border-color:#424735; color:#c6d7a7; }
html.dark .configuration-status[data-tone="pending"] { background:#151515; border-color:#53412b; color:#f4bc79; }
@media(max-width:680px) {
  .configuration-directory { gap:14px; }
  .configuration-directory .configuration-table-card { padding:14px; }
  .configuration-directory-controls { width:100%; }
  .configuration-company-toolbar .configuration-directory-search { flex:1 1 200px; width:auto; }
  .configuration-company-metrics { gap:8px; }
  .configuration-company-metric { padding:12px 9px; }
  .configuration-company-metric h2 { font-size:10px; }
  .configuration-company-metric strong { font-size:23px; }
}
