/* TALENTA Premium — Product Design Layer */
.premium-page { max-width: 1280px; margin: 0 auto; animation: premiumFadeIn 0.35s var(--ease); }
.premium-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-6); margin-bottom: var(--s-8); padding-bottom: var(--s-6); border-bottom: 1px solid var(--border-subtle); }
.premium-page-title { font-size: var(--text-2xl); font-weight: var(--weight-semibold); letter-spacing: -0.03em; margin: 0; }
.premium-page-sub { font-size: var(--text-sm); color: var(--ink-tertiary); margin: var(--s-2) 0 0; }
.premium-page-actions { display: flex; gap: var(--s-2); flex-shrink: 0; flex-wrap: wrap; }
@keyframes premiumFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.header-nav-group { display: flex; align-items: center; gap: var(--s-1); min-width: 0; flex: 1; }
.header-nav-btn:not([hidden]):hover { background: var(--surface-2); }
.header-icon-btn.is-active { background: var(--accent-soft); color: var(--accent); }

.sidebar-brand { padding: var(--s-5) var(--s-4) !important; border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--s-2); }
.sidebar-isotipo { display: flex; line-height: 0; flex-shrink: 0; }
.sidebar-isotipo svg { border-radius: 8px; filter: drop-shadow(0 2px 6px rgba(8, 145, 178, 0.28)); }
.sidebar-brand-text { display: flex; flex-direction: column; gap: 2px; }
.sidebar-brand-name { font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.1em; color: var(--accent); }

/* ── Marca TALENTA — isotipo premium ── */
[data-brand-logo],
.brand-isotipo-mounted { display: inline-flex; line-height: 0; flex-shrink: 0; }
[data-brand-logo] svg,
.brand-lockup-iso svg { display: block; border-radius: 11px; }
.portal-aside [data-brand-logo] svg {
  filter: drop-shadow(0 8px 24px rgba(6, 182, 212, 0.45)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.portal-main [data-brand-logo] svg {
  filter: drop-shadow(0 4px 14px rgba(8, 145, 178, 0.32));
}
.pin-logo svg { filter: drop-shadow(0 6px 18px rgba(8, 145, 178, 0.38)); border-radius: 11px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand-lockup-name {
  font-size: var(--lockup-fs, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--ink);
}
.brand-lockup-tag {
  display: block;
  font-size: var(--lockup-tag, 0.65rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-tertiary);
  margin-top: 2px;
}
.sidebar-brand-module { font-size: var(--text-xs); color: var(--ink-tertiary); }
.sidebar-item { margin: 2px var(--s-2); border-radius: var(--radius-md) !important; }
.sidebar-item:hover { background: var(--surface-2) !important; }
.sidebar-item.active { background: var(--accent-soft) !important; color: var(--accent) !important; font-weight: var(--weight-medium); box-shadow: inset 3px 0 0 var(--accent); }

.smart-table { display: flex; flex-direction: column; gap: var(--s-2); }
.smart-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--surface-0); border-radius: var(--radius-lg); border: 1px solid transparent; cursor: pointer; min-height: 72px; transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast); }
.smart-row:hover { border-color: var(--border); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.smart-row-name { font-size: var(--text-md); font-weight: var(--weight-medium); }
.smart-row-meta { font-size: var(--text-xs); color: var(--ink-tertiary); margin-top: 2px; }
.smart-row-actions { display: flex; gap: var(--s-1); opacity: 0; transition: opacity var(--duration-fast); }
.smart-row:hover .smart-row-actions { opacity: 1; }

.dash-premium { max-width: 1200px; }
.dash-hero h1 { font-size: var(--text-2xl); font-weight: var(--weight-semibold); letter-spacing: -0.03em; margin: 0 0 var(--s-2); }
.dash-hero p { color: var(--ink-tertiary); font-size: var(--text-sm); margin: 0 0 var(--s-10); }
.dash-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-10); }
.dash-kpi-chip { padding: var(--s-5); background: var(--surface-0); border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); }
.dash-kpi-chip .kpi-val { font-size: var(--text-2xl); font-weight: var(--weight-semibold); }
.dash-kpi-chip .kpi-lbl { font-size: var(--text-xs); color: var(--ink-tertiary); margin-top: var(--s-2); }
.dash-kpi-chip.critical { border-color: var(--danger-soft); background: linear-gradient(135deg, var(--surface-0), var(--danger-soft)); }
.dash-kpi-chip.critical .kpi-val { color: var(--danger); }
.dash-focus-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin-bottom: var(--s-5); }
.dash-action-list { display: flex; flex-direction: column; gap: var(--s-3); }
.dash-action-item { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--surface-0); border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); transition: border-color var(--duration-fast); }
.dash-action-item:hover { border-color: var(--border); }
.dash-action-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.dash-action-icon.danger { background: var(--danger-soft); color: var(--danger); }
.dash-action-icon.warning { background: var(--warning-soft); color: var(--warning); }
.dash-action-body { flex: 1; }
.dash-action-body strong { display: block; font-size: var(--text-sm); }
.dash-action-body span { font-size: var(--text-xs); color: var(--ink-tertiary); }
.dash-secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); margin-top: var(--s-10); }
@media (max-width: 900px) { .dash-secondary-grid { grid-template-columns: 1fr; } }
.dash-panel { padding: var(--s-6); background: var(--surface-0); border-radius: var(--radius-xl); border: 1px solid var(--border-subtle); }
.dash-panel h3 { font-size: var(--text-md); font-weight: var(--weight-semibold); margin: 0 0 var(--s-4); }

.expediente-view { animation: premiumFadeIn 0.3s var(--ease); }
.exp-header { padding: var(--s-8) !important; border-radius: var(--radius-xl) !important; border: 1px solid var(--border-subtle) !important; background: var(--surface-0) !important; }

.doc-manager-toolbar { display: flex; gap: var(--s-3); margin-bottom: var(--s-6); flex-wrap: wrap; }
.doc-category-premium { margin-bottom: var(--s-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.doc-cat-toggle { width: 100%; display: flex; justify-content: space-between; padding: var(--s-4) var(--s-5); border: none; background: var(--surface-1); cursor: pointer; font-family: inherit; }
.doc-cat-body { padding: var(--s-4); display: none; }
.doc-cat-body.open { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-3); }
#doc-manager-root { display: flex; flex-direction: column; gap: var(--s-3); }
.doc-card-premium { display: flex; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.doc-card-premium.loaded { border-left: 3px solid var(--success); }
.doc-card-premium.pending { border-left: 3px solid var(--border-strong); }

.formato-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-5); }
.formato-lib-card { display: flex; flex-direction: column; padding: var(--s-6); background: var(--surface-0); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); cursor: pointer; text-align: left; font-family: inherit; transition: transform var(--duration-fast), box-shadow var(--duration-fast); }
.formato-lib-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.formato-lib-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: var(--s-4); }

.inc-picker { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.inc-chip { width: 26px; height: 26px; border: none; border-radius: var(--radius-sm); font-size: 9px; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--ink-tertiary); font-family: inherit; }
.inc-chip.selected { color: #fff; }
.inc-chip.inc-A.selected { background: var(--success); }
.inc-chip.inc-F.selected { background: var(--danger); }
.inc-chip.inc-R.selected { background: var(--warning); }
.inc-chip.inc-V.selected { background: #0891b2; }
.inc-chip.inc-HE.selected { background: var(--accent); }

.skeleton-list { display: flex; flex-direction: column; gap: var(--s-3); }
.skeleton-row { display: flex; gap: var(--s-4); padding: var(--s-4); }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); animation: skeletonShimmer 1.2s infinite; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: var(--s-2); }
.skeleton-lines span { height: 10px; border-radius: 4px; background: var(--surface-3); animation: skeletonShimmer 1.2s infinite; }
@keyframes skeletonShimmer { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.barra-modo-impresion { display: flex !important; align-items: center; justify-content: center; gap: var(--s-4); pointer-events: auto !important; position: relative; }
.barra-modo-impresion[hidden] { display: none !important; }
.barra-modo-close { position: absolute; right: var(--s-4); width: 32px; height: 32px; border: none; background: rgba(255,255,255,0.15); color: #fff; border-radius: 50%; font-size: 18px; cursor: pointer; }

.detail-panel { display: none !important; }
body.detail-panel-open { overflow: auto !important; }
.content-area { padding: var(--s-8) var(--s-10) !important; }

.seg-module { margin-bottom: var(--s-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.seg-module-toggle { width: 100%; padding: var(--s-4); border: none; background: var(--surface-1); cursor: pointer; display: flex; justify-content: space-between; font-family: inherit; }
.seg-module-body { padding: var(--s-4); display: none; }
.seg-module-body.open { display: block; }

.plantilla-toolbar-premium { display: flex; gap: var(--s-3); margin-bottom: var(--s-6); flex-wrap: wrap; align-items: center; }
.view-segment { display: flex; background: var(--surface-2); padding: 3px; border-radius: var(--radius-md); }
.view-segment button { border: none; background: none; padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm); font-size: var(--text-xs); cursor: pointer; font-family: inherit; color: var(--ink-tertiary); }
.view-segment button.active { background: var(--surface-0); color: var(--ink); box-shadow: var(--shadow-xs); }

.encuesta-baja-wrap { max-height: 58vh; overflow-y: auto; }
.encuesta-baja-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.encuesta-salida-form .enc-seccion { margin-bottom: var(--s-6); padding-bottom: var(--s-5); border-bottom: 1px solid var(--border-subtle); }
.encuesta-salida-form .enc-seccion h4 { font-size: var(--text-md); font-weight: var(--weight-semibold); margin: 0 0 var(--s-3); }
.enc-progreso { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin: var(--s-3) 0 var(--s-1); }
.enc-progreso-bar { height: 100%; background: var(--accent); transition: width 0.3s; }
.enc-progreso-text { font-size: var(--text-xs); color: var(--ink-tertiary); }
.enc-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-2); }
.enc-check { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); cursor: pointer; }
.enc-likert-row { margin-bottom: var(--s-4); }
.enc-likert-label { display: block; font-size: var(--text-sm); margin-bottom: var(--s-2); color: var(--ink-secondary); }
.enc-likert-scale { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.enc-likert-opt { display: flex; flex-direction: column; align-items: center; cursor: pointer; font-size: var(--text-xs); }
.enc-likert-opt span { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.enc-likert-opt input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.enc-scale-hint { font-size: 10px; color: var(--ink-placeholder); }
.enc-sino-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); font-size: var(--text-sm); }
.enc-sino-opts { display: flex; gap: var(--s-4); }
.enc-sino-opts label { display: flex; align-items: center; gap: var(--s-1); cursor: pointer; }
