/* Slice 9 — Empleado full page (#view-empleado only) */

html.mando-authed #view-empleado.empleado-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--app-topbar-h, 0px));
  background: var(--bg);
  margin: 0;
  padding: 0;
}
html.mando-authed #view-empleado.empleado-page.hidden {
  display: none !important;
}

html.mando-authed #view-empleado header.empleado-page-head {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--bg);
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 16px 0;
  padding-right: 16px;
}
html.mando-authed #view-empleado .empleado-page-head {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 16px 0;
}

html.mando-authed #view-empleado .empleado-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
html.mando-authed #view-empleado .empleado-crumb-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
html.mando-authed #view-empleado .empleado-crumb-link:hover {
  color: var(--ink);
}
html.mando-authed #view-empleado .empleado-crumb-cur {
  color: var(--ink);
  font-weight: 600;
}

html.mando-authed #view-empleado .empleado-head-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
html.mando-authed #view-empleado .empleado-head-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
}
html.mando-authed #view-empleado .empleado-head-id {
  flex: 1;
  min-width: 0;
}
html.mando-authed #view-empleado .empleado-head-name {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 4px;
  color: var(--ink);
}
html.mando-authed #view-empleado .empleado-head-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
html.mando-authed #view-empleado .empleado-estado-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid var(--hairline);
}
html.mando-authed #view-empleado .empleado-estado-chip.activo {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--hairline));
}
html.mando-authed #view-empleado .empleado-estado-chip.inactivo {
  background: var(--amber-bg);
  color: var(--amber-text);
  border-color: color-mix(in srgb, var(--amber-text) 25%, var(--hairline));
}

html.mando-authed #view-empleado .empleado-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
html.mando-authed #view-empleado .empleado-head-actions--desk {
  margin-left: auto;
}
html.mando-authed #view-empleado .empleado-mobile-savebar {
  display: none;
}
html.mando-authed #view-empleado .empleado-head-actions .btn-secondary,
html.mando-authed #view-empleado .empleado-head-actions .btn-primary {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
}
html.mando-authed #view-empleado .empleado-save-btn.btn-primary {
  background: var(--ink) !important;
  color: var(--bg) !important;
  border-color: var(--ink) !important;
}

html.mando-authed #view-empleado .empleado-estado-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin: 12px 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}
html.mando-authed #view-empleado .empleado-estado-banner.activo {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--hairline));
}
html.mando-authed #view-empleado .empleado-estado-banner.inactivo {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid color-mix(in srgb, var(--amber-text) 25%, var(--hairline));
}
html.mando-authed #view-empleado .empleado-estado-action {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-text);
  cursor: pointer;
  flex-shrink: 0;
}
html.mando-authed #view-empleado .empleado-estado-action--secondary {
  color: var(--ink);
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 10px;
  padding: 6px 12px;
}

html.mando-authed #view-empleado .empleado-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
html.mando-authed #view-empleado .empleado-tabs::-webkit-scrollbar {
  display: none;
}
html.mando-authed #view-empleado .empleado-tab {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 12px 10px 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
html.mando-authed #view-empleado .empleado-tab.active {
  color: var(--ink);
  font-weight: 650;
  border-bottom-color: var(--ink);
}
@media (min-width: 800px) {
  html.mando-authed #view-empleado header.empleado-page-head,
  html.mando-authed #view-empleado .empleado-page-head {
    padding-left: 40px;
    padding-right: 40px;
  }
  html.mando-authed #view-empleado .empleado-tabs {
    margin: 0;
    padding-left: 30px;
    padding-right: 30px;
  }
  html.mando-authed #view-empleado .empleado-page-body {
    padding-left: 40px;
    padding-right: 40px;
  }
}

html.mando-authed #view-empleado .empleado-page-body {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px) + 72px);
  max-width: 920px;
  width: 100%;
}
html.mando-authed #view-empleado .empleado-tab-panel.hidden {
  display: none;
}
html.mando-authed #view-empleado .empleado-tab-panel[data-empleado-tab="checadas"] .checadas-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}
html.mando-authed #view-empleado .empleado-tab-panel[data-empleado-tab="checadas"] > .btn-primary {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  box-sizing: border-box;
}

/* Cards */
html.mando-authed #view-empleado .empleado-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.04);
}
html[data-theme="dark"].mando-authed #view-empleado .empleado-card {
  background: #141415;
}
html.mando-authed #view-empleado .empleado-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  position: static;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
html[data-theme="dark"].mando-authed #view-empleado .empleado-card-head {
  background: #141415;
}
html.mando-authed #view-empleado .empleado-card.collapsed .empleado-card-head {
  border-bottom: none;
}
html.mando-authed #view-empleado .empleado-card.collapsed .empleado-card-body {
  display: none;
}
html.mando-authed #view-empleado .empleado-card-chevron {
  transition: transform 0.15s ease;
  transform: rotate(0deg);
}
html.mando-authed #view-empleado .empleado-card:not(.collapsed) .empleado-card-chevron {
  transform: rotate(90deg);
}
html.mando-authed #view-empleado .empleado-card-title {
  font-size: 13px;
  font-weight: 650;
  margin: 0;
  letter-spacing: 0.01em;
  color: var(--ink);
}
html.mando-authed #view-empleado .empleado-card-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 0;
  font-weight: 400;
}
html.mando-authed #view-empleado .empleado-card-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3E%3Cpath d='M7 5l4 4-4 4' stroke='%236B6A66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-theme="dark"].mando-authed #view-empleado .empleado-card-chevron {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3E%3Cpath d='M7 5l4 4-4 4' stroke='%239A9A96' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html.mando-authed #view-empleado .empleado-card-body {
  padding: 14px;
}

/* Form fields */
html.mando-authed #view-empleado .form-group {
  margin-bottom: 12px;
}
html.mando-authed #view-empleado .form-group:last-child {
  margin-bottom: 0;
}
html.mando-authed #view-empleado .form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 5px;
  text-transform: none;
}
html.mando-authed #view-empleado .form-input,
html.mando-authed #view-empleado .form-textarea,
html.mando-authed #view-empleado select.form-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
html.mando-authed #view-empleado .form-textarea {
  min-height: 72px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.4;
}
html.mando-authed #view-empleado select.form-input {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%236B6A66' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
html.mando-authed #view-empleado input[type="date"].form-input,
html.mando-authed #view-empleado input[type="time"].form-input {
  font-variant-numeric: tabular-nums;
}
html.mando-authed #view-empleado .form-helper,
html.mando-authed #view-empleado .form-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 4px;
}
html.mando-authed #view-empleado .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  html.mando-authed #view-empleado .form-row-2 {
    grid-template-columns: 1fr;
  }
  html.mando-authed #view-empleado .empleado-head-actions--desk {
    display: none;
  }
  html.mando-authed #view-empleado .empleado-mobile-savebar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    gap: 8px;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--hairline);
    box-shadow: 0 -4px 16px rgba(20, 20, 19, 0.06);
  }
  html.mando-authed #view-empleado .empleado-mobile-savebar .btn-secondary,
  html.mando-authed #view-empleado .empleado-mobile-savebar .btn-primary {
    flex: 1;
    height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
  }
  html.mando-authed #view-empleado .empleado-page-body {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px) + 56px + 64px);
  }
}

html.mando-authed #view-empleado .edit-section-title {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  margin: 16px 0 10px;
}
html.mando-authed #view-empleado .empleado-nomina-flags-title {
  margin-top: 8px !important;
}

/* Day chips */
html.mando-authed #view-empleado .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
html.mando-authed #view-empleado .checkbox-pill {
  position: relative;
  margin: 0;
}
html.mando-authed #view-empleado .checkbox-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
html.mando-authed #view-empleado .checkbox-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
html.mando-authed #view-empleado .checkbox-pill input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Segmented pills (jornada, comida) */
html.mando-authed #view-empleado .radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
html.mando-authed #view-empleado .radio-pill {
  position: relative;
  margin: 0;
}
html.mando-authed #view-empleado .radio-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
html.mando-authed #view-empleado .radio-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
html.mando-authed #view-empleado .radio-pill input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Toggle switches */
html.mando-authed #view-empleado .toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
html.mando-authed #view-empleado .toggle-row:last-child {
  border-bottom: none;
}
html.mando-authed #view-empleado .toggle-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
html.mando-authed #view-empleado .toggle-row .sublabel {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
  line-height: 1.35;
}
html.mando-authed #view-empleado .toggle-switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--hairline);
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
html.mando-authed #view-empleado .toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s;
}
html.mando-authed #view-empleado .toggle-switch.on {
  background: var(--ink);
}
html.mando-authed #view-empleado .toggle-switch.on::after {
  transform: translateX(18px);
}

/* Áreas chips */
html.mando-authed #view-empleado #edit-areas-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
  grid-template-columns: unset !important;
  margin-bottom: 12px !important;
}
html.mando-authed #view-empleado .area-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
html.mando-authed #view-empleado .area-chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Docs list */
html.mando-authed #view-empleado .doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
html.mando-authed #view-empleado .doc-kind-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--hairline);
  color: var(--muted);
  margin-right: 6px;
}

/* Contrato strip */
html.mando-authed #view-empleado .empleado-contrato-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
}
html.mando-authed #view-empleado .empleado-contrato-strip::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 14px;
  height: 2px;
  background: var(--hairline);
  z-index: 0;
}
html.mando-authed #view-empleado .empleado-contrato-stage {
  text-align: center;
  position: relative;
  z-index: 1;
}
html.mando-authed #view-empleado .empleado-contrato-stage .dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 2px solid var(--hairline);
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
html.mando-authed #view-empleado .empleado-contrato-stage.done .dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
html.mando-authed #view-empleado .empleado-contrato-stage.current .dot {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
html.mando-authed #view-empleado .empleado-contrato-stage .lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  padding: 0 2px;
}
html.mando-authed #view-empleado .empleado-contrato-stage .dates {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
}
@media (max-width: 420px) {
  html.mando-authed #view-empleado .empleado-contrato-strip {
    gap: 4px;
  }
  html.mando-authed #view-empleado .empleado-contrato-stage .dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
    margin-bottom: 4px;
  }
  html.mando-authed #view-empleado .empleado-contrato-strip::before {
    top: 12px;
  }
}

html.mando-authed #view-empleado .empleado-resumen-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
html.mando-authed #view-empleado .empleado-resumen-row:last-child {
  border-bottom: none;
}
html.mando-authed #view-empleado .empleado-resumen-label {
  color: var(--muted);
}

html.mando-authed #view-empleado .money-val {
  color: #0a7a3b;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"].mando-authed #view-empleado .money-val {
  color: #1a9b5c;
}

html.mando-authed #view-empleado #edit-contrato-fechas input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1.5px solid var(--hairline);
  background: var(--bg);
  cursor: pointer;
  vertical-align: middle;
}
html.mando-authed #view-empleado #edit-contrato-fechas input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' fill='none'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
html.mando-authed #view-empleado #edit-contrato-fechas input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

html.mando-authed body.empleado-page-open .app-content > :not(#view-empleado) {
  display: none !important;
}
html.mando-authed body.empleado-page-open #view-empleado {
  display: flex !important;
}
html.mando-authed body.empleado-page-open #view-empleado.hidden {
  display: none !important;
}
