/* ==========================================================================
   FICHA 360 & NÓMINA - RECURSOS HUMANOS (CODELCO DIVISIÓN ANDINA)
   ========================================================================== */

:root {
  --color-header-bg: #122d3b;
  --color-header-tag: #829ea9;
  --color-header-text: #ffffff;
  
  --color-sidebar-bg: #edf3f7;
  --color-sidebar-border: #dbe4eb;
  --color-sidebar-label: #5d7889;
  --color-sidebar-text: #2c4453;
  --color-sidebar-active: #007b83;
  
  --color-main-bg: #eef3f7;
  --color-card-bg: #ffffff;
  --color-card-border: #e2eaf0;
  --color-card-shadow: 0 1px 3px rgba(15, 34, 46, 0.05);
  
  --color-title: #132d3b;
  --color-subtitle: #4c6676;
  --color-muted: #6e8696;
  --color-teal: #007b83;
  --color-teal-dark: #00636a;
  --color-teal-light: #e6f6f4;
  
  --color-red: #b83232;
  --color-amber: #d97706;
  --color-green: #059669;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-main-bg);
  color: var(--color-title);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   TOP HEADER & SHORTCUTS
   ========================================================================== */
.top-header {
  min-height: 64px;
  background-color: var(--color-header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--color-header-tag);
  text-transform: uppercase;
}

.header-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-header-text);
  line-height: 1.1;
}

.header-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-shortcut {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2ecf2;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-shortcut:hover,
.btn-shortcut.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-shortcut.proto-btn {
  background: rgba(0, 123, 131, 0.4);
  border-color: #007b83;
  color: #ccebe9;
}

.btn-shortcut.proto-btn:hover {
  background: #007b83;
  color: #ffffff;
}

.shortcut-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.shortcut-dot.green { background-color: var(--color-green); }
.shortcut-dot.teal  { background-color: #2dd4bf; }
.shortcut-dot.amber { background-color: var(--color-amber); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header-view {
  background: var(--color-teal);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-header-view:hover {
  background: var(--color-teal-dark);
}

.badge-status-mode {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #a4bcc9;
  text-transform: uppercase;
}

.btn-swagger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-swagger:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   APP LAYOUT: SIDEBAR + MAIN CONTENT
   ========================================================================== */
.app-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 64px);
}

/* SIDEBAR */
.sidebar {
  width: 270px;
  background-color: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-sidebar-border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--color-sidebar-label);
  text-transform: uppercase;
}

/* Vistas Principales Switcher */
.view-switch-tabs {
  display: flex;
  background: #dfe8ee;
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.view-switch-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-sidebar-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.view-switch-btn.active {
  background: #ffffff;
  color: var(--color-teal);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.view-btn-icon {
  font-size: 14px;
}

/* ==========================================================================
   CUSTOM SEARCHABLE COMBOBOX (SELECT BONITO Y FUNCIONAL)
   ========================================================================== */
.custom-combobox {
  position: relative;
  width: 100%;
}

.combobox-trigger {
  width: 100%;
  background: #ffffff;
  border: 1px solid #c9d8e2;
  border-radius: 7px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
  user-select: none;
}

.combobox-trigger:hover {
  border-color: #9cb2c2;
}

.combobox-trigger.open {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0, 123, 131, 0.15);
}

.trigger-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

.trigger-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trigger-meta {
  font-size: 11px;
  color: var(--color-muted);
}

.combobox-caret {
  font-size: 11px;
  color: var(--color-muted);
  margin-left: 6px;
}

.combobox-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: #ffffff;
  border: 1px solid #c9d8e2;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(18, 45, 59, 0.18);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.combobox-dropdown.show {
  display: flex;
}

.combobox-search-wrapper {
  padding: 8px 10px;
  border-bottom: 1px solid #eef3f7;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
}

.combobox-search-wrapper .search-icon {
  font-size: 12px;
  color: var(--color-muted);
}

.combobox-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-title);
  outline: none;
  font-family: inherit;
}

.btn-clear-combobox {
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}

.combobox-results {
  max-height: 280px;
  overflow-y: auto;
}

.combobox-item {
  padding: 8px 12px;
  border-bottom: 1px solid #f4f7f9;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.combobox-item:last-child {
  border-bottom: none;
}

.combobox-item:hover,
.combobox-item.active {
  background-color: #f0f8fa;
}

.item-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-title);
}

.item-sub {
  font-size: 10.5px;
  color: var(--color-muted);
}

/* Gerencia Sidebar Select */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.sidebar-select {
  width: 100%;
  height: 36px;
  background: #ffffff;
  border: 1px solid #c9d8e2;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-sidebar-text);
  outline: none;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sidebar-select:focus {
  border-color: var(--color-teal);
}

/* Sidebar Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-btn {
  background: none;
  border: none;
  text-align: left;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-sidebar-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.nav-btn:hover {
  background-color: #e2ecf2;
}

.nav-btn.active {
  background-color: var(--color-sidebar-active);
  color: #ffffff;
}

/* Bottom Sidebar Info */
.sidebar-footer-info {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-sidebar-border);
}

.footer-info-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.info-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--color-teal);
  text-transform: uppercase;
}

.info-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-title);
}

.info-sub {
  font-size: 11px;
  color: var(--color-muted);
}

.footer-info-brand {
  font-size: 10px;
  color: var(--color-muted);
}

/* ==========================================================================
   MAIN CONTENT AREA & VIEWS
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  position: relative;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(238, 243, 247, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-teal);
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 123, 131, 0.2);
  border-top-color: var(--color-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   CARD: TOP PERSONAL PROFILE
   ========================================================================== */
.personal-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  box-shadow: var(--color-card-shadow);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-container {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #d7e4ec;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.personal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.name-with-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.person-name {
  font-size: 22px;
  font-weight: 800;
  color: #122d3b;
  line-height: 1.2;
}

.badge-source {
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.badge-source-mini {
  font-size: 9px;
  font-weight: 700;
  background: #f8fafc;
  color: #64748b;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #e2e8f0;
}

.person-role {
  font-size: 14px;
  font-weight: 600;
  color: #385160;
}

.person-department {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-muted);
}

.personal-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.contract-badge {
  background-color: var(--color-teal-light);
  color: var(--color-teal);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
}

.sindicato-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.sindicato-badge.is-sindicalizado {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.sindicato-badge.not-sindicalizado {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.personal-id-text,
.personal-rut-text {
  font-size: 12px;
  color: #557080;
}

.personal-id-text strong,
.personal-rut-text strong {
  color: var(--color-title);
  font-weight: 700;
}

/* ==========================================================================
   KPI ROW (6 CARDS)
   ========================================================================== */
.kpi-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 2fr;
  gap: 12px;
}

.kpi-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  box-shadow: var(--color-card-shadow);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 98px;
}

.kpi-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--color-muted);
  text-transform: uppercase;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 2px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-teal);
  line-height: 1;
}

.kpi-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
}

/* Compensation Card */
.kpi-card-compensation {
  padding: 12px 16px;
}

.kpi-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-title);
  margin-bottom: 4px;
}

.compensation-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  align-items: flex-end;
}

.comp-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.comp-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-muted);
}

.comp-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--color-teal);
  line-height: 1.1;
}

/* ==========================================================================
   DASHBOARD CARDS & GRIDS
   ========================================================================== */
.dashboard-grid {
  display: grid;
  gap: 12px;
}

.grid-row-1 {
  grid-template-columns: 1.35fr 1fr 1fr 1.65fr;
  transition: grid-template-columns 0.3s ease;
}

.grid-row-1.no-360 {
  grid-template-columns: 1.35fr 1.25fr 1.8fr;
}

.grid-row-2 {
  grid-template-columns: 1.25fr 1.15fr 1.6fr;
}

.dash-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  box-shadow: var(--color-card-shadow);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-title);
  line-height: 1.3;
}

.card-subtitle {
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 1px;
  margin-bottom: 10px;
  display: block;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.card-foot-note {
  font-size: 10px;
  color: var(--color-muted);
  margin-top: auto;
  padding-top: 10px;
}

/* Traffic Light Dots */
.status-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green { background-color: var(--color-green); }
.dot-amber { background-color: var(--color-amber); }
.dot-red   { background-color: var(--color-red); }

/* Card: Datos Laborales */
.data-table-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  border-bottom: 1px solid #f2f6f9;
  padding-bottom: 5px;
}

.data-row.stacked {
  flex-direction: column;
  border-bottom: none;
  padding-bottom: 0;
  gap: 2px;
}

.data-key {
  color: var(--color-muted);
  font-weight: 500;
}

.data-val {
  color: var(--color-title);
  font-weight: 600;
  text-align: right;
}

.data-val-strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-title);
  margin-top: 2px;
}

.data-val-sub {
  font-size: 11px;
  color: var(--color-muted);
}

/* Card: Desempeño */
.desempeno-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.desempeno-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.desempeno-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.year-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-teal);
}

.rating-score {
  font-size: 11px;
  color: var(--color-muted);
  font-weight: 600;
}

.rating-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-title);
}

/* Card: Evaluación 360 */
.bars-list-360 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bar-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-bar-track {
  flex: 1;
  height: 8px;
  background-color: #e5edf1;
  border-radius: 4px;
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.mini-bar-fill.blue { background-color: #2563eb; }
.mini-bar-fill.dark-green { background-color: #15803d; }
.mini-bar-fill.lime { background-color: #84cc16; }
.mini-bar-fill.orange { background-color: #ea580c; }
.mini-bar-fill.red { background-color: #dc2626; }
.mini-bar-fill.gray { background-color: #cbd5e1; }
/* Aliases */
.mini-bar-fill.green { background-color: #15803d; }
.mini-bar-fill.teal { background-color: #0d9488; }
.mini-bar-fill.amber { background-color: #ea580c; }

.bar-desc {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-title);
}

/* Card: Sucesión Table */
.table-responsive-compact {
  width: 100%;
  overflow-x: auto;
}

.table-sucesion {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 2px;
}

.table-sucesion th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-teal);
  background-color: #f1f8f9;
  padding: 6px 5px;
  white-space: nowrap;
}

.table-sucesion td {
  padding: 8px 5px;
  color: var(--color-title);
  border-bottom: 1px solid #edf3f7;
  white-space: nowrap;
}

/* Card: Ausentismo */
.table-ausentismo {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.table-ausentismo th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-muted);
  padding: 5px 3px;
  border-bottom: 1px solid #eef3f7;
}

.table-ausentismo td {
  padding: 7px 3px;
  vertical-align: middle;
}

.year-bold {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-title);
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-bar-fill {
  height: 7px;
  background-color: var(--color-teal);
  border-radius: 4px;
  flex: 1;
  max-width: 95px;
}

.progress-rate {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-teal);
  white-space: nowrap;
}

.days-val {
  text-align: right;
  font-weight: 600;
  color: var(--color-title);
}

/* Card: Amonestaciones, Felicitaciones y Accidentes */
.kpi-boxes-split {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 4px 0 10px;
}

.box-stat {
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.box-stat.box-gray {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.box-stat.box-mint {
  background-color: var(--color-teal-light);
  border: 1px solid #bbf7d0;
}

.box-stat.box-amber {
  background-color: #fff7ed;
  border: 1px solid #ffedd5;
}

.box-stat.box-amber.is-zero {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

.box-number-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.box-number {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

.box-gray .box-number {
  color: var(--color-title);
}

.box-mint .box-number {
  color: var(--color-teal);
}

.box-amber .box-number {
  color: #ea580c;
}

.box-amber.is-zero .box-number {
  color: var(--color-title);
}

.box-warning-icon {
  font-size: 14px;
  line-height: 1;
  cursor: help;
  display: inline-block;
  animation: pulse-warn 1.8s infinite ease-in-out;
}

@keyframes pulse-warn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); filter: drop-shadow(0 0 3px rgba(234, 88, 12, 0.6)); }
}

.box-label {
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  white-space: nowrap;
}

.box-gray .box-label {
  color: var(--color-muted);
}

.box-mint .box-label {
  color: var(--color-teal);
}

.box-amber .box-label {
  color: #c2410c;
}

.box-amber.is-zero .box-label {
  color: var(--color-muted);
}

.box-sublabel {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--color-muted);
  margin-top: 2px;
}

.acc-kpi-warning-note {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
  font-size: 10.5px;
  padding: 5px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.acc-warning-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Card: Accidentabilidad & Calificación */
.accidentes-stats-row {
  display: flex;
  gap: 18px;
  margin-top: 2px;
}

.acc-stat-main {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-teal);
}

.acc-subtext {
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 3px;
  margin-bottom: 8px;
}

.acc-snippets {
  max-height: 70px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acc-snippet-item {
  font-size: 11px;
  background: #f8fafc;
  border-left: 3px solid var(--color-amber);
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
  color: #334155;
  line-height: 1.3;
}

.card-divider {
  height: 1px;
  background-color: #edf2f6;
  margin: 8px 0 10px;
}

.calificacion-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calificacion-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-title);
}

.calificacion-status {
  font-size: 11px;
  color: var(--color-muted);
  font-style: italic;
}

.calificacion-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.btn-calif {
  background: #ffffff;
  border: 1px solid #d5e0e7;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-title);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-calif:hover {
  background: #f7fafc;
  border-color: #a0aec0;
}

.btn-calif.active {
  border-color: var(--color-teal);
  background-color: var(--color-teal-light);
  color: var(--color-teal);
  font-weight: 700;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.content-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  font-size: 11px;
  color: var(--color-muted);
  border-top: 1px solid #e1ebf0;
  margin-top: 4px;
}

/* ==========================================================================
   TABS 2, 3, 4, 5 LAYOUTS
   ========================================================================== */
.tab-header-box {
  background: #ffffff;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--color-card-border);
}

.section-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-title);
}

.section-subheading {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 3px;
}

.trayectoria-grid,
.desarrollo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.eval-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.full-width {
  grid-column: 1 / -1;
}

.table-eval-full {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}

.table-eval-full th {
  background: #f1f8f9;
  color: var(--color-teal);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #ddebf0;
}

.table-eval-full td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef3f7;
  color: var(--color-title);
  vertical-align: top;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #edf2f6;
  border-radius: 8px;
  margin-top: 8px;
  background: #fbfdfe;
}

.cert-icon {
  font-size: 22px;
}

.cert-institution {
  font-size: 11px;
  color: var(--color-muted);
}

.nine-box-matrix {
  background: #f4faf9;
  border: 1px solid #ccebe6;
  border-radius: 8px;
  padding: 14px;
  margin-top: 8px;
}

.matrix-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-teal);
  display: block;
  margin-bottom: 3px;
}

.matrix-desc {
  font-size: 11px;
  color: var(--color-subtitle);
  line-height: 1.4;
}

/* ==========================================================================
   PÁGINA 2: NÓMINA GENERAL Y FILTROS AVANZADOS
   ========================================================================== */
.nomina-header-card {
  background: #ffffff;
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  box-shadow: var(--color-card-shadow);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 14px;
}

.nomina-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nomina-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-title);
}

.nomina-subtitle {
  font-size: 12.5px;
  color: var(--color-muted);
  margin-top: 3px;
}

.nomina-summary-badge {
  background: var(--color-teal-light);
  color: var(--color-teal);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.nomina-filters-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.3fr 1.1fr 1.2fr 1.8fr;
  gap: 10px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--color-sidebar-label);
  text-transform: uppercase;
}

.filter-select {
  height: 38px;
  background: #ffffff;
  border: 1px solid #c9d8e2;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-title);
  outline: none;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.filter-select:focus {
  border-color: var(--color-teal);
}

.filter-search-wrap {
  position: relative;
  width: 100%;
}

.filter-search-input {
  width: 100%;
  height: 38px;
  background: #ffffff;
  border: 1px solid #c9d8e2;
  border-radius: 7px;
  padding: 0 28px 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-title);
  outline: none;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.filter-search-input:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0, 123, 131, 0.15);
}

.btn-clear-nomina-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 12px;
  cursor: pointer;
}

.nomina-table-card {
  padding: 0;
  overflow: hidden;
}

.table-responsive-nomina {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}

.table-nomina-full {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table-nomina-full th {
  position: sticky;
  top: 0;
  background: #f1f8f9;
  color: var(--color-teal);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 2px solid #ddebf0;
  white-space: nowrap;
  z-index: 10;
}

.table-nomina-full td {
  padding: 10px 14px;
  border-bottom: 1px solid #edf3f7;
  color: var(--color-title);
  vertical-align: middle;
}

.table-nomina-full tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.table-nomina-full tbody tr:hover {
  background-color: #f2f9fa;
}

.btn-open-ficha {
  background: var(--color-teal);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.btn-open-ficha:hover {
  background: var(--color-teal-dark);
}

.badge-tag-indicator {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
  white-space: nowrap;
}
.badge-tag-indicator.blue       { background: #dbeafe; color: #1e40af; }
.badge-tag-indicator.dark-green { background: #dcfce7; color: #14532d; }
.badge-tag-indicator.lime       { background: #ecfccb; color: #3f6212; }
.badge-tag-indicator.orange     { background: #ffedd5; color: #9a3412; }
.badge-tag-indicator.green      { background: #d1fae5; color: #065f46; }
.badge-tag-indicator.teal       { background: #ccfbf1; color: #0f766e; }
.badge-tag-indicator.amber      { background: #fef3c7; color: #92400e; }
.badge-tag-indicator.red        { background: #fee2e2; color: #991b1b; }
.badge-tag-indicator.purple     { background: #f3e8ff; color: #6b21a8; }
.badge-tag-indicator.slate      { background: #f1f5f9; color: #475569; }

.nomina-footer-bar {
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid #eef3f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--color-muted);
}

.nomina-tip {
  font-style: italic;
  color: #475569;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1280px) {
  .grid-row-1 { grid-template-columns: 1fr 1fr; }
  .grid-row-2 { grid-template-columns: 1fr 1fr; }
  .kpi-metrics-row { grid-template-columns: repeat(3, 1fr); }
  .kpi-card-compensation { grid-column: span 3; }
  .nomina-filters-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; }
  .grid-row-1, .grid-row-2, .trayectoria-grid, .desarrollo-grid { grid-template-columns: 1fr; }
  .kpi-metrics-row { grid-template-columns: 1fr 1fr; }
  .kpi-card-compensation { grid-column: span 2; }
  .nomina-filters-grid { grid-template-columns: 1fr; }
}

.text-muted {
  color: var(--color-muted) !important;
  font-weight: 500;
}

.empty-state-si {
  padding: 16px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
}

.badge-si {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

/* ==========================================================================
   DATOS SENSIBLES: PROTECCIÓN, ESCUDO Y MODAL DE AUTORIZACIÓN
   ========================================================================== */

.btn-sensitive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-sensitive-toggle:hover {
  background-color: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-sensitive-toggle.unlocked {
  background-color: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-sensitive-toggle.unlocked:hover {
  background-color: #dbeafe;
  border-color: #60a5fa;
  color: #1e40af;
}

.sensitive-target {
  position: relative;
  overflow: hidden;
}

/* Estado Bloqueado / Censurado (por defecto) */
body.sensitive-locked .sensitive-shield {
  display: flex !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: inherit;
  transition: opacity 0.3s ease;
}

body.sensitive-locked .sensitive-content {
  filter: blur(6px);
  opacity: 0.25;
  user-select: none;
  pointer-events: none;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Estado Desbloqueado */
body.sensitive-unlocked .sensitive-shield {
  display: none !important;
}

body.sensitive-unlocked .sensitive-content {
  filter: none;
  opacity: 1;
  user-select: auto;
  pointer-events: auto;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Elementos del Escudo de Censura */
.shield-icon {
  font-size: 24px;
  margin-bottom: 4px;
  display: block;
}

.shield-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 3px;
  display: block;
}

.shield-desc {
  font-size: 10.5px;
  color: #64748b;
  max-width: 280px;
  margin: 0 auto 8px;
  line-height: 1.35;
}

.btn-shield-unlock {
  background: #0d9488;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-shield-unlock:hover {
  background: #0f766e;
  transform: translateY(-1px);
}

/* Modal de Autenticación */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: fadeInModal 0.2s ease;
}

.modal-auth-box {
  background: #ffffff;
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  padding: 24px;
  position: relative;
  border: 1px solid #e2e8f0;
}

.modal-auth-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-icon-wrap {
  font-size: 24px;
  background: #f1f5f9;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.auth-header-text {
  flex: 1;
}

.modal-auth-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.modal-auth-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.btn-close-modal:hover {
  color: #0f172a;
}

.form-group-auth {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  padding: 10px 42px 10px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 15px;
  opacity: 0.6;
  padding: 4px;
}

.btn-toggle-pwd:hover {
  opacity: 1;
}

.auth-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: shakeModal 0.35s ease;
}

.modal-auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-auth-cancel {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auth-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-auth-submit {
  background: #0d9488;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-auth-submit:hover {
  background: #0f766e;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shakeModal {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.modal-shake {
  animation: shakeModal 0.35s ease;
}


/* ==============================================================================
 * AUTOCONTENIDO: GESTOR DE DATOS LOCALES E INDEXEDDB
 * ============================================================================== */
.header-data-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.header-data-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
.header-data-status.empty .dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.btn-data-manager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-data-manager:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==============================================================================
   BLOQUEO TOTAL CUANDO NO HAY BASE DE DATOS CARGADA (GATEKEEPER)
   ============================================================================== */
body.is-locked {
  background-color: #0b1120 !important;
  overflow: hidden !important;
  height: 100vh !important;
}

body.is-locked .top-header,
body.is-locked .app-layout,
body.is-locked #modalSensitiveAuth,
body.is-locked .loading-overlay {
  display: none !important;
}

/* Modal en estado bloqueado */
body.is-locked .data-manager-modal {
  display: flex !important;
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0b1120 100%) !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  padding: 20px;
}

body.is-locked .data-manager-modal .data-manager-box {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8) !important;
  animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-locked .data-manager-close-btn,
body.is-locked #dmModalFooter,
body.is-locked #dmCurrentInfo {
  display: none !important;
}

body.is-locked #dmUnlockActionRow {
  display: block !important;
}

/* Modal de Carga / Gestión de Datos */
.data-manager-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.data-manager-modal.active {
  display: flex;
}

.data-manager-box {
  background: #fff;
  width: 100%;
  max-width: 580px;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.data-manager-header {
  background: #1e293b;
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.data-manager-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dm-header-icon {
  font-size: 24px;
}
.data-manager-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dm-subtitle {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 2px 0 0 0;
  font-weight: 400;
}
.data-manager-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.data-manager-close-btn:hover {
  color: #fff;
}

.data-manager-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Alertas de error y éxito */
.dm-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}
.dm-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-weight: 500;
}
.dm-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-weight: 600;
}
.dm-privacy-note {
  font-size: 12.5px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 8px;
}

/* Indicador de archivo seleccionado */
.dm-selected-file-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}
.dm-selected-file-badge .dm-file-icon {
  font-size: 22px;
}
.dm-selected-file-badge .dm-file-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  min-width: 0;
}
.dm-selected-file-badge .dm-file-meta strong {
  color: #1e3a8a;
  word-break: break-all;
}
.dm-selected-file-badge .dm-file-meta span {
  color: #64748b;
  font-size: 11px;
}
.dm-selected-file-badge .btn-remove-file {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 11.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s;
}
.dm-selected-file-badge .btn-remove-file:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: #0f766e;
  background: #f0fdfa;
}
.drop-zone-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.drop-zone-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.drop-zone-sub {
  font-size: 12px;
  color: #64748b;
}

.data-password-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.data-password-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-input-wrapper .data-password-input {
  width: 100%;
  padding: 10px 42px 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
}
.btn-toggle-pwd {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 6px 8px;
  opacity: 0.65;
  transition: opacity 0.2s;
}
.btn-toggle-pwd:hover {
  opacity: 1;
}
.password-hint {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Botón de desbloqueo principal */
.dm-unlock-action-row {
  margin-top: 4px;
}
.btn-unlock-app {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.btn-unlock-app:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}
.btn-unlock-app:active {
  transform: translateY(0);
}
.btn-unlock-app:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake {
  animation: shakeError 0.4s ease !important;
}

.import-progress-bar-container {
  display: none;
  flex-direction: column;
  gap: 6px;
}
.import-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.import-progress-fill {
  width: 0%;
  height: 100%;
  background: #0f766e;
  transition: width 0.15s ease;
}
.import-progress-label {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
}

.data-manager-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.data-manager-actions {
  display: flex;
  gap: 8px;
}

.btn-secondary-dm {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.btn-secondary-dm:hover {
  background: #e2e8f0;
}

.btn-primary-dm {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  background: #0f766e;
  color: #fff;
  border: none;
}
.btn-primary-dm:hover {
  background: #0d9488;
}

.btn-danger-dm {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.btn-danger-dm:hover {
  background: #fee2e2;
}
