/* =========================================================
   UBICACIÓN:
   frontend/src/pages/capital-humano/desempeno/desempeno.css

   WIRTZ HUB · CAPITAL HUMANO · DESEMPEÑO
   PARTE 1 DE 2
   ========================================================= */

/* =========================================================
   PAGE
   ========================================================= */

.performance-page {
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 10px;

  padding: 8px;

  color: var(--text);
  background: var(--background);
}

/* =========================================================
   CONTENEDOR GLOBAL
   ========================================================= */

.app-content:has(.performance-page) {
  display: block !important;

  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  padding: 0 !important;

  overflow-x: hidden !important;
}

body:has(.performance-page),
body:has(.performance-page) .app-shell,
body:has(.performance-page) .app-main {
  width: 100%;
  min-width: 0;

  overflow-x: hidden;
}

/* =========================================================
   ICONOS
   ========================================================= */

.performance-page .icon,
.performance-modal .icon,
.performance-toast .icon {
  width: 17px;
  height: 17px;

  stroke-width: 1.9;

  flex: 0 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.performance-head {
  width: 100%;
  min-width: 0;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto
    auto;

  align-items: center;

  gap: 18px;

  padding: 16px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 20%,
      var(--border)
    );

  border-radius: 14px;

  background: var(--panel);

  overflow: hidden;
}

/* =========================================================
   HEADER · BRAND
   ========================================================= */

.performance-brand {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 14px;
}

.performance-brand__icon {
  width: 52px;
  height: 52px;

  flex: 0 0 52px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  border-radius: 12px;

  background: var(--background);
  color: var(--text);
}

.performance-brand__icon .icon {
  width: 23px;
  height: 23px;
}

.performance-brand > div {
  min-width: 0;
}

.performance-brand > div > span {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 750;

  line-height: 1.2;

  letter-spacing: 0.12em;

  text-transform: uppercase;
}

.performance-brand h2 {
  margin: 0;

  color: var(--text);

  font-size: clamp(22px, 2vw, 28px);
  font-weight: 760;

  line-height: 1.08;

  letter-spacing: -0.035em;
}

.performance-brand p {
  max-width: 620px;

  margin: 7px 0 0;

  color: var(--muted);

  font-size: 12px;
  font-weight: 500;

  line-height: 1.45;
}

/* =========================================================
   HEADER · STATUS
   ========================================================= */

.performance-head__status {
  display: flex;
  align-items: stretch;

  gap: 7px;
}

.performance-head-status {
  min-width: 120px;

  display: flex;
  align-items: center;

  gap: 9px;

  padding: 9px 11px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 10px;

  background: var(--background);
}

.performance-head-status > .icon {
  width: 16px;
  height: 16px;

  color: var(--muted);
}

.performance-head-status > span {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 1px;
}

.performance-head-status small {
  color: var(--muted);

  font-size: 9px;
  font-weight: 700;

  line-height: 1.2;

  letter-spacing: 0.055em;

  text-transform: uppercase;
}

.performance-head-status strong {
  max-width: 160px;

  overflow: hidden;

  color: var(--text);

  font-size: 11px;
  font-weight: 720;

  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   HEADER · ACTIONS
   ========================================================= */

.performance-head__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 7px;

  flex-wrap: wrap;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.performance-btn {
  min-height: 36px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  padding: 0 12px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--panel);
  color: var(--text);

  font: inherit;

  font-size: 11px;
  font-weight: 700;

  line-height: 1;

  cursor: pointer;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.performance-btn:hover:not(:disabled) {
  background: var(--background);

  border-color: color-mix(
    in srgb,
    var(--text) 28%,
    var(--border)
  );
}

.performance-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.performance-btn:disabled {
  opacity: 0.42;

  cursor: not-allowed;
}

.performance-btn--dark {
  border-color: #0a0a0a;

  background: #0a0a0a;
  color: #ffffff;
}

.performance-btn--dark:hover:not(:disabled) {
  border-color: #1d1d1d;

  background: #1d1d1d;
}

.performance-btn--compact {
  min-height: 32px;

  padding-inline: 10px;
}

.performance-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   DARK BUTTON
   ========================================================= */

:root[data-theme="dark"] .performance-btn--dark,
[data-theme="dark"] .performance-btn--dark {
  border-color: #f0f0f0;

  background: #f0f0f0;
  color: #090909;
}

:root[data-theme="dark"] .performance-btn--dark:hover:not(:disabled),
[data-theme="dark"] .performance-btn--dark:hover:not(:disabled) {
  border-color: #ffffff;

  background: #ffffff;
}

/* =========================================================
   MÉTRICAS
   ========================================================= */

.performance-metrics {
  width: 100%;
  min-width: 0;

  display: grid;

  grid-template-columns: repeat(
    6,
    minmax(0, 1fr)
  );

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 20%,
      var(--border)
    );

  border-radius: 14px;

  background: var(--panel);

  overflow: hidden;
}

.performance-metric {
  position: relative;

  min-width: 0;
  min-height: 106px;

  display: grid;

  grid-template-columns:
    38px
    minmax(0, 1fr)
    20px;

  align-items: center;

  gap: 9px;

  padding: 13px;

  border: 0;

  border-right: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: transparent;
  color: var(--text);

  font: inherit;

  text-align: left;

  cursor: pointer;

  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.performance-metric:last-child {
  border-right: 0;
}

.performance-metric:hover {
  background: var(--background);
}

.performance-metric.is-active {
  background: var(--background);
}

.performance-metric__icon {
  width: 38px;
  height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--panel);
  color: var(--text);
}

.performance-metric__icon .icon {
  width: 18px;
  height: 18px;
}

.performance-metric__copy {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 3px;
}

.performance-metric__copy small {
  overflow: hidden;

  color: var(--muted);

  font-size: 9px;
  font-weight: 750;

  line-height: 1.2;

  letter-spacing: 0.075em;

  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.performance-metric__copy strong {
  overflow: hidden;

  color: var(--text);

  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 760;

  line-height: 1.18;

  letter-spacing: -0.025em;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-metric__copy em {
  overflow: hidden;

  color: var(--muted);

  font-size: 10px;
  font-style: normal;
  font-weight: 500;

  line-height: 1.25;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-metric__arrow {
  width: 20px;
  height: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: var(--muted);

  opacity: 0.7;
}

.performance-metric__arrow .icon {
  width: 14px;
  height: 14px;
}

/* =========================================================
   TABS
   ========================================================= */

.performance-tabs {
  width: 100%;

  display: flex;
  align-items: center;

  gap: 5px;

  padding: 4px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 20%,
      var(--border)
    );

  border-radius: 10px;

  background: var(--panel);
}

.performance-tab {
  min-height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  padding: 0 11px;

  border: 1px solid transparent;
  border-radius: 7px;

  background: transparent;
  color: var(--muted);

  font: inherit;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.performance-tab:hover {
  background: var(--background);
  color: var(--text);
}

.performance-tab.is-active {
  border-color: color-mix(
    in srgb,
    var(--text) 18%,
    var(--border)
  );

  background: var(--background);
  color: var(--text);
}

/* =========================================================
   PANELS
   ========================================================= */

.performance-panel,
.performance-objectives-panel {
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 20%,
      var(--border)
    );

  border-radius: 14px;

  background: var(--panel);

  overflow: hidden;
}

/* =========================================================
   FILTROS
   ========================================================= */

.performance-filters {
  width: 100%;

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--panel);
}

.performance-filters__head {
  min-height: 70px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  padding: 13px 14px;
}

.performance-filters__title {
  min-width: 0;
}

.performance-filters__title > span {
  display: block;

  margin-bottom: 3px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 750;

  line-height: 1.2;

  letter-spacing: 0.11em;

  text-transform: uppercase;
}

.performance-filters__title > strong {
  display: block;

  color: var(--text);

  font-size: 15px;
  font-weight: 750;

  line-height: 1.25;
}

.performance-filters__title p {
  margin: 4px 0 0;

  color: var(--muted);

  font-size: 10px;
  font-weight: 500;

  line-height: 1.4;
}

.performance-filters__summary {
  display: flex;
  align-items: center;

  gap: 10px;
}

.performance-filters__summary > span {
  display: inline-flex;
  align-items: center;

  gap: 6px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 600;
}

.performance-filters__summary > span strong {
  min-width: 22px;
  height: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding-inline: 5px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 6px;

  background: var(--background);
  color: var(--text);

  font-size: 10px;
}

/* =========================================================
   SEARCH
   ========================================================= */

.performance-search-row {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 7px;

  padding: 0 14px 13px;
}

.performance-search {
  position: relative;

  min-width: 0;

  display: flex;
  align-items: center;
}

.performance-search > .icon {
  position: absolute;

  left: 12px;

  width: 15px;
  height: 15px;

  color: var(--muted);

  pointer-events: none;
}

.performance-search input {
  width: 100%;
  min-width: 0;
  height: 38px;

  padding:
    0
    38px
    0
    36px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 9px;

  outline: none;

  background: var(--background);
  color: var(--text);

  font: inherit;

  font-size: 11px;
  font-weight: 520;
}

.performance-search input::placeholder {
  color: var(--muted);

  opacity: 0.75;
}

.performance-search input:focus {
  border-color: color-mix(
    in srgb,
    var(--text) 32%,
    var(--border)
  );
}

.performance-search button {
  position: absolute;

  right: 7px;

  width: 26px;
  height: 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 6px;

  background: transparent;
  color: var(--muted);

  cursor: pointer;
}

.performance-search button:hover {
  background: var(--panel);
  color: var(--text);
}

/* =========================================================
   FILTER BODY
   ========================================================= */

.performance-filters__body {
  display: none;

  border-top: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--background);
}

.performance-filters.is-open .performance-filters__body {
  display: block;
}

.performance-filters-grid {
  display: grid;

  grid-template-columns: repeat(
    3,
    minmax(0, 1fr)
  );

  gap: 10px;

  padding: 13px 14px;
}

/* =========================================================
   FIELDS
   ========================================================= */

.performance-filter-field,
.performance-field {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 5px;
}

.performance-filter-field > span,
.performance-field > span {
  color: var(--muted);

  font-size: 9px;
  font-weight: 700;

  line-height: 1.2;

  letter-spacing: 0.045em;

  text-transform: uppercase;
}

.performance-filter-field select,
.performance-filter-field input,
.performance-field select,
.performance-field input,
.performance-field textarea {
  width: 100%;
  min-width: 0;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 8px;

  outline: none;

  background: var(--panel);
  color: var(--text);

  font: inherit;

  font-size: 11px;
  font-weight: 520;
}

.performance-filter-field select,
.performance-filter-field input,
.performance-field select,
.performance-field input {
  height: 36px;

  padding: 0 10px;
}

.performance-field textarea {
  min-height: 88px;

  padding: 10px;

  line-height: 1.45;

  resize: vertical;
}

.performance-filter-field select:focus,
.performance-filter-field input:focus,
.performance-field select:focus,
.performance-field input:focus,
.performance-field textarea:focus {
  border-color: color-mix(
    in srgb,
    var(--text) 32%,
    var(--border)
  );
}

.performance-field--full {
  grid-column: 1 / -1;
}

/* =========================================================
   FILTER FOOTER
   ========================================================= */

.performance-filters__footer {
  min-height: 50px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 10px 14px;

  border-top: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );
}

.performance-filters__footer > span {
  display: inline-flex;
  align-items: center;

  gap: 6px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 500;
}

/* =========================================================
   TABLE
   ========================================================= */

.performance-table-wrap {
  width: 100%;
  min-width: 0;

  overflow-x: auto;
  overflow-y: hidden;
}

.performance-table {
  width: 100%;
  min-width: 1160px;

  border-collapse: collapse;
  border-spacing: 0;

  table-layout: auto;
}

.performance-table th,
.performance-table td {
  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  text-align: left;
  vertical-align: middle;
}

.performance-table th:not(:last-child),
.performance-table td:not(:last-child) {
  border-right: 1px solid
    color-mix(
      in srgb,
      var(--text) 12%,
      var(--border)
    );
}

.performance-table th {
  height: 42px;

  padding: 0 10px;

  background: var(--background);
  color: var(--muted);

  font-size: 9px;
  font-weight: 750;

  line-height: 1.2;

  letter-spacing: 0.045em;

  text-transform: uppercase;

  white-space: nowrap;
}

.performance-table td {
  height: 58px;

  padding: 8px 10px;

  background: var(--panel);
  color: var(--text);

  font-size: 11px;
}

.performance-table tbody tr:hover td {
  background: var(--background);
}

.performance-table tbody tr:last-child td {
  border-bottom: 0;
}

/* =========================================================
   PERSON
   ========================================================= */

.performance-person {
  min-width: 180px;

  display: flex;
  align-items: center;

  gap: 9px;
}

.performance-person__avatar {
  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 8px;

  background: var(--background);
  color: var(--text);

  font-size: 9px;
  font-weight: 760;

  letter-spacing: 0.035em;
}

.performance-person > div {
  min-width: 0;
}

.performance-person strong {
  display: block;

  max-width: 180px;

  overflow: hidden;

  color: var(--text);

  font-size: 11px;
  font-weight: 720;

  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-person small {
  display: block;

  margin-top: 2px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 550;
}

/* =========================================================
   TABLE CELLS
   ========================================================= */

.performance-cell-main {
  display: block;

  max-width: 150px;

  overflow: hidden;

  color: var(--text);

  font-size: 10px;
  font-weight: 570;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-period {
  display: inline-flex;
  align-items: center;

  gap: 5px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 600;

  white-space: nowrap;
}

.performance-period .icon {
  width: 13px;
  height: 13px;
}

.performance-table-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 27px;
  height: 25px;

  padding-inline: 6px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 14%,
      var(--border)
    );

  border-radius: 7px;

  background: var(--background);
  color: var(--text);

  font-size: 10px;
  font-weight: 720;
}

/* =========================================================
   SCORE
   ========================================================= */

.performance-score {
  min-width: 58px;

  display: inline-flex;
  align-items: baseline;

  gap: 3px;

  white-space: nowrap;
}

.performance-score strong {
  color: var(--text);

  font-size: 14px;
  font-weight: 780;

  letter-spacing: -0.02em;
}

.performance-score small {
  color: var(--muted);

  font-size: 8px;
  font-weight: 600;
}

.performance-score--empty strong {
  color: var(--muted);
}

.performance-score--empty {
  flex-direction: column;

  gap: 0;
}

/* =========================================================
   LEVEL / STATE
   ========================================================= */

.performance-level,
.performance-state,
.performance-objective-state {
  min-height: 25px;

  display: inline-flex;
  align-items: center;

  gap: 5px;

  padding: 0 7px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 999px;

  background: var(--background);
  color: var(--text);

  font-size: 9px;
  font-weight: 700;

  white-space: nowrap;
}

.performance-level .icon,
.performance-state .icon,
.performance-objective-state .icon {
  width: 12px;
  height: 12px;
}

.performance-level--a-mejorar,
.performance-level--critico,
.performance-state--borrador,
.performance-state--pendiente,
.performance-objective-state--pendiente,
.performance-objective-state--cancelado,
.performance-objective-state--no-cumplido {
  color: var(--muted);
}

/* =========================================================
   ROW ACTIONS
   ========================================================= */

.performance-row-actions {
  display: flex;
  align-items: center;

  gap: 4px;

  white-space: nowrap;
}

.performance-icon-btn {
  width: 28px;
  height: 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 7px;

  background: var(--panel);
  color: var(--muted);

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.performance-icon-btn:hover {
  border-color: color-mix(
    in srgb,
    var(--text) 28%,
    var(--border)
  );

  background: var(--background);
  color: var(--text);
}

.performance-icon-btn--danger:hover {
  color: #b42318;

  border-color: color-mix(
    in srgb,
    #b42318 38%,
    var(--border)
  );
}

.performance-icon-btn .icon {
  width: 14px;
  height: 14px;
}

/* =========================================================
   LOADING / EMPTY
   ========================================================= */

.performance-table-message {
  padding: 0 !important;
}

.performance-loading,
.performance-empty {
  width: 100%;
  min-height: 220px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 7px;

  padding: 28px;

  text-align: center;
}

.performance-loading > span,
.performance-empty > span {
  width: 40px;
  height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 10px;

  background: var(--background);
  color: var(--text);
}

.performance-loading strong,
.performance-empty strong {
  color: var(--text);

  font-size: 13px;
  font-weight: 730;
}

.performance-loading p,
.performance-empty p {
  max-width: 420px;

  margin: 0;

  color: var(--muted);

  font-size: 10px;
  font-weight: 500;

  line-height: 1.45;
}

.performance-empty .performance-btn {
  margin-top: 5px;
}

.performance-empty--error > span {
  color: #b42318;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.performance-pagination {
  min-height: 54px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 9px 13px;

  border-top: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--panel);
}

.performance-pagination__info {
  display: flex;
  align-items: center;

  gap: 4px;

  color: var(--muted);

  font-size: 10px;
}

.performance-pagination__info strong {
  color: var(--text);

  font-weight: 720;
}

.performance-pagination__actions {
  display: flex;
  align-items: center;

  gap: 7px;
}

.performance-pagination__page {
  padding: 0 5px;

  color: var(--muted);

  font-size: 10px;

  white-space: nowrap;
}

.performance-pagination__page strong {
  color: var(--text);
}

/* =========================================================
   OBJECTIVES PANEL
   ========================================================= */

.performance-objectives-head {
  min-height: 82px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  padding: 13px 14px;

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );
}

.performance-objectives-head > div:first-child > span {
  display: block;

  margin-bottom: 3px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 750;

  letter-spacing: 0.11em;

  text-transform: uppercase;
}

.performance-objectives-head > div:first-child > strong {
  display: block;

  color: var(--text);

  font-size: 15px;
  font-weight: 750;
}

.performance-objectives-head > div:first-child > p {
  margin: 4px 0 0;

  color: var(--muted);

  font-size: 10px;
}

.performance-objectives-summary {
  display: grid;

  grid-template-columns: repeat(
    3,
    minmax(90px, 1fr)
  );

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 9px;

  overflow: hidden;
}

.performance-objectives-summary article {
  min-width: 90px;

  padding: 8px 10px;

  border-right: 1px solid
    color-mix(
      in srgb,
      var(--text) 14%,
      var(--border)
    );

  background: var(--background);
}

.performance-objectives-summary article:last-child {
  border-right: 0;
}

.performance-objectives-summary small {
  display: block;

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;

  text-transform: uppercase;
}

.performance-objectives-summary strong {
  display: block;

  margin-top: 2px;

  color: var(--text);

  font-size: 14px;
  font-weight: 760;
}

.performance-objective-overview {
  display: grid;

  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );

  gap: 9px;

  padding: 12px;
}

.performance-objective-overview-card {
  min-width: 0;

  display: grid;

  grid-template-columns:
    32px
    minmax(0, 1fr)
    auto
    16px;

  align-items: center;

  gap: 9px;

  padding: 10px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--background);
  color: var(--text);

  font: inherit;

  text-align: left;

  cursor: pointer;
}

.performance-objective-overview-card:hover {
  border-color: color-mix(
    in srgb,
    var(--text) 28%,
    var(--border)
  );
}

.performance-objective-overview-card__copy {
  min-width: 0;
}

.performance-objective-overview-card__copy strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 11px;
  font-weight: 720;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-objective-overview-card__copy small {
  display: block;

  margin-top: 2px;

  overflow: hidden;

  color: var(--muted);

  font-size: 9px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-objective-overview-card__count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;

  gap: 1px;
}

.performance-objective-overview-card__count strong {
  color: var(--text);

  font-size: 13px;
}

.performance-objective-overview-card__count small {
  color: var(--muted);

  font-size: 8px;
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

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

.performance-spin {
  animation: performanceSpin 0.8s linear infinite;
}

@keyframes performanceFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.performance-page {
  animation: performanceFadeIn 0.2s ease both;
}

/* =========================================================
   CONTINÚA EN PARTE 2

   - Modales
   - Formularios
   - Detalle
   - Criterios
   - Puntajes
   - Objetivos
   - Historial
   - Toast
   - Dark mode
   - Responsive completo
   ========================================================= *//* =========================================================
   WIRTZ HUB · CAPITAL HUMANO · DESEMPEÑO
   PARTE 2 DE 2

   CONTINÚA DESPUÉS DE:
   @keyframes performanceFadeIn
   ========================================================= */

/* =========================================================
   MODAL · BACKDROP
   ========================================================= */

.performance-modal-backdrop {
  position: fixed;
  inset: 0;

  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.72);
}

body.performance-modal-open {
  overflow: hidden;
}

/* =========================================================
   MODAL
   ========================================================= */

.performance-modal {
  width: min(1040px, 100%);
  max-height: calc(100vh - 40px);

  display: flex;
  flex-direction: column;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 20%,
      var(--border)
    );

  border-radius: 14px;

  background: var(--panel);
  color: var(--text);

  overflow: hidden;

  box-shadow: none;

  animation: performanceModalIn 0.18s ease both;
}

.performance-modal--small {
  width: min(760px, 100%);
}

.performance-modal--detail {
  width: min(980px, 100%);
}

.performance-modal--history {
  width: min(820px, 100%);
}

.performance-modal--score {
  width: min(980px, 100%);
}

@keyframes performanceModalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   MODAL · HEAD
   ========================================================= */

.performance-modal__head {
  min-height: 82px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  padding: 14px 16px;

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--panel);
}

.performance-modal__brand {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 12px;
}

.performance-modal__icon {
  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  border-radius: 10px;

  background: var(--background);
  color: var(--text);
}

.performance-modal__icon .icon {
  width: 19px;
  height: 19px;
}

.performance-modal__brand > div {
  min-width: 0;
}

.performance-modal__brand > div > span {
  display: block;

  margin-bottom: 3px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 750;

  letter-spacing: 0.11em;

  text-transform: uppercase;
}

.performance-modal__brand h3 {
  margin: 0;

  color: var(--text);

  font-size: 17px;
  font-weight: 760;

  line-height: 1.2;

  letter-spacing: -0.02em;
}

.performance-modal__brand p {
  margin: 4px 0 0;

  color: var(--muted);

  font-size: 10px;
  font-weight: 500;

  line-height: 1.4;
}

.performance-modal__close {
  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  border-radius: 8px;

  background: var(--background);
  color: var(--muted);

  cursor: pointer;
}

/* =========================================================
   FORM
   ========================================================= */

.performance-form {
  min-height: 0;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
}

.performance-form-section {
  padding: 15px 16px;

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );
}

.performance-form-section:last-of-type {
  border-bottom: 0;
}

.performance-form-section__title {
  display: flex;
  align-items: center;

  gap: 10px;

  margin-bottom: 13px;
}

.performance-form-section__icon {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 8px;

  background: var(--background);
  color: var(--text);
}

.performance-form-section__title > div > span {
  display: block;

  margin-bottom: 2px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 750;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.performance-form-section__title > div > strong {
  display: block;

  color: var(--text);

  font-size: 12px;
  font-weight: 730;
}

.performance-form-grid {
  display: grid;

  grid-template-columns: repeat(
    3,
    minmax(0, 1fr)
  );

  gap: 10px;
}

/* =========================================================
   MODAL · FOOTER
   ========================================================= */

.performance-modal__footer {
  position: sticky;
  bottom: 0;

  z-index: 2;

  min-height: 64px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 12px 16px;

  border-top: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--panel);
}

.performance-modal__footer > div {
  display: flex;
  align-items: center;

  gap: 7px;

  margin-left: auto;
}

.performance-modal__warning {
  display: inline-flex;
  align-items: center;

  gap: 6px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 560;
}

/* =========================================================
   DETAIL
   ========================================================= */

.performance-detail {
  min-height: 0;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
}

.performance-detail-summary {
  display: grid;

  grid-template-columns: repeat(
    4,
    minmax(0, 1fr)
  );

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );
}

.performance-detail-summary article {
  min-width: 0;

  padding: 13px;

  border-right: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--background);
}

.performance-detail-summary article:last-child {
  border-right: 0;
}

.performance-detail-summary small {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 750;

  letter-spacing: 0.065em;

  text-transform: uppercase;
}

.performance-detail-summary strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 15px;
  font-weight: 760;

  letter-spacing: -0.02em;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-detail-summary strong span {
  color: var(--muted);

  font-size: 9px;
  font-weight: 600;
}

/* =========================================================
   DETAIL SECTION
   ========================================================= */

.performance-detail-section {
  padding: 14px 16px;

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );
}

.performance-detail-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 11px;
}

.performance-detail-section > header > div > span {
  display: block;

  margin-bottom: 2px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 750;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.performance-detail-section > header > div > strong {
  display: block;

  color: var(--text);

  font-size: 13px;
  font-weight: 730;
}

/* =========================================================
   CRITERIA SUMMARY
   ========================================================= */

.performance-criteria-summary {
  display: grid;

  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );

  gap: 8px;
}

.performance-criterion-summary {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 10px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--background);
}

.performance-criterion-summary > div {
  min-width: 0;
}

.performance-criterion-summary strong {
  display: block;

  color: var(--text);

  font-size: 11px;
  font-weight: 720;
}

.performance-criterion-summary small {
  display: block;

  margin-top: 3px;

  overflow: hidden;

  color: var(--muted);

  font-size: 9px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-criterion-summary > span {
  min-width: 32px;
  height: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  border-radius: 7px;

  background: var(--panel);
  color: var(--text);

  font-size: 12px;
  font-weight: 760;
}

/* =========================================================
   FEEDBACK
   ========================================================= */

.performance-detail-feedback {
  display: grid;

  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );
}

.performance-detail-feedback article {
  padding: 13px 16px;

  border-right: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--background);
}

.performance-detail-feedback article:last-child {
  border-right: 0;
}

.performance-detail-feedback article > span {
  display: inline-flex;
  align-items: center;

  gap: 6px;

  color: var(--text);

  font-size: 10px;
  font-weight: 720;
}

.performance-detail-feedback article > span .icon {
  width: 14px;
  height: 14px;
}

.performance-detail-feedback p {
  margin: 7px 0 0;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.5;

  white-space: pre-wrap;
}

/* =========================================================
   OBJECTIVES LIST
   ========================================================= */

.performance-objectives-list {
  display: grid;

  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );

  gap: 8px;
}

.performance-objective {
  min-width: 0;

  padding: 11px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--background);
}

.performance-objective__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 10px;
}

.performance-objective__head > div {
  min-width: 0;
}

.performance-objective__head > div > strong {
  display: block;

  margin-top: 7px;

  color: var(--text);

  font-size: 11px;
  font-weight: 730;

  line-height: 1.35;
}

.performance-objective__progress-number {
  color: var(--text);

  font-size: 13px;
  font-weight: 760;

  white-space: nowrap;
}

.performance-objective > p {
  margin: 8px 0 0;

  color: var(--muted);

  font-size: 9px;

  line-height: 1.45;
}

/* =========================================================
   PROGRESS
   ========================================================= */

.performance-progress {
  width: 100%;
  height: 7px;

  margin-top: 10px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 14%,
      var(--border)
    );

  border-radius: 999px;

  background: var(--panel);

  overflow: hidden;
}

.performance-progress > span {
  display: block;

  height: 100%;

  background: var(--text);
}

.performance-objective__meta {
  display: flex;
  align-items: center;

  gap: 9px;

  flex-wrap: wrap;

  margin-top: 9px;
}

.performance-objective__meta span {
  display: inline-flex;
  align-items: center;

  gap: 4px;

  color: var(--muted);

  font-size: 8px;
}

.performance-objective__meta .icon {
  width: 11px;
  height: 11px;
}

.performance-objective__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 4px;

  margin-top: 9px;

  padding-top: 8px;

  border-top: 1px solid
    color-mix(
      in srgb,
      var(--text) 14%,
      var(--border)
    );
}

/* =========================================================
   DETAIL FOOTER
   ========================================================= */

.performance-detail-footer {
  min-height: 56px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 7px;

  padding: 10px 14px;

  border-top: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--panel);
}

/* =========================================================
   SCORE INTRO
   ========================================================= */

.performance-score-intro {
  padding: 14px 16px;

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  background: var(--background);
}

.performance-score-intro > div:first-child > span {
  display: block;

  margin-bottom: 2px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 750;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.performance-score-intro > div:first-child > strong {
  display: block;

  color: var(--text);

  font-size: 13px;
  font-weight: 730;
}

.performance-score-intro > div:first-child > p {
  margin: 4px 0 0;

  color: var(--muted);

  font-size: 10px;
}

/* =========================================================
   SCORE SCALE
   ========================================================= */

.performance-score-scale {
  display: grid;

  grid-template-columns: repeat(
    5,
    minmax(0, 1fr)
  );

  margin-top: 12px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 8px;

  overflow: hidden;
}

.performance-score-scale span {
  min-height: 46px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 2px;

  padding: 6px;

  border-right: 1px solid
    color-mix(
      in srgb,
      var(--text) 14%,
      var(--border)
    );

  background: var(--panel);
  color: var(--muted);

  font-size: 8px;

  text-align: center;
}

.performance-score-scale span:last-child {
  border-right: 0;
}

.performance-score-scale strong {
  color: var(--text);

  font-size: 12px;
  font-weight: 760;
}

/* =========================================================
   SCORE LIST
   ========================================================= */

.performance-score-list {
  display: flex;
  flex-direction: column;

  gap: 8px;

  padding: 12px 16px;
}

.performance-score-item {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 12px;

  padding: 11px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--background);
}

.performance-score-item__info {
  min-width: 0;

  display: grid;

  grid-template-columns:
    28px
    minmax(0, 1fr);

  gap: 8px;
}

.performance-score-item__info > span {
  width: 28px;
  height: 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 7px;

  background: var(--panel);
  color: var(--muted);

  font-size: 8px;
  font-weight: 700;
}

.performance-score-item__info strong {
  display: block;

  color: var(--text);

  font-size: 11px;
  font-weight: 730;
}

.performance-score-item__info p {
  max-width: 520px;

  margin: 4px 0 0;

  color: var(--muted);

  font-size: 9px;

  line-height: 1.4;
}

.performance-score-item__values {
  display: flex;
  align-items: center;

  gap: 4px;
}

.performance-score-item__values label {
  cursor: pointer;
}

.performance-score-item__values input {
  position: absolute;

  opacity: 0;
  pointer-events: none;
}

.performance-score-item__values label span {
  width: 31px;
  height: 31px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 18%,
      var(--border)
    );

  border-radius: 7px;

  background: var(--panel);
  color: var(--muted);

  font-size: 10px;
  font-weight: 720;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.performance-score-item__values label:hover span {
  color: var(--text);

  border-color: color-mix(
    in srgb,
    var(--text) 28%,
    var(--border)
  );
}

.performance-score-item__values input:checked + span {
  border-color: var(--text);

  background: var(--text);
  color: var(--panel);
}

.performance-score-item__observation {
  grid-column: 1 / -1;
}

.performance-score-item__observation textarea {
  min-height: 58px;
}

/* =========================================================
   HISTORY
   ========================================================= */

.performance-history {
  min-height: 0;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
}

.performance-history-list {
  display: flex;
  flex-direction: column;

  gap: 8px;

  padding: 12px;
}

.performance-history-item {
  display: grid;

  grid-template-columns:
    34px
    minmax(0, 1fr);

  gap: 10px;

  padding: 10px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--background);
}

.performance-history-item__icon {
  width: 34px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 8px;

  background: var(--panel);
  color: var(--text);
}

.performance-history-item__copy {
  min-width: 0;
}

.performance-history-item__copy > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;
}

.performance-history-item__copy > div:first-child strong {
  color: var(--text);

  font-size: 10px;
  font-weight: 730;
}

.performance-history-item__copy > div:first-child span {
  color: var(--muted);

  font-size: 8px;
}

.performance-history-item__copy > small {
  display: block;

  margin-top: 4px;

  color: var(--muted);

  font-size: 8px;
}

.performance-history-item__copy > p {
  display: flex;
  align-items: center;

  gap: 7px;

  margin: 7px 0 0;

  color: var(--text);

  font-size: 10px;
}

.performance-history-item__copy > p span {
  color: var(--muted);
}

.performance-history-item__copy > p .icon {
  width: 12px;
  height: 12px;
}

.performance-history-item__copy > em {
  display: block;

  margin-top: 6px;

  color: var(--muted);

  font-size: 9px;
  font-style: normal;
}

.performance-history-item__copy > footer {
  margin-top: 8px;

  padding-top: 7px;

  border-top: 1px solid
    color-mix(
      in srgb,
      var(--text) 14%,
      var(--border)
    );
}

.performance-history-item__copy > footer span {
  display: inline-flex;
  align-items: center;

  gap: 4px;

  color: var(--muted);

  font-size: 8px;
}

/* =========================================================
   TOAST
   ========================================================= */

.performance-toast {
  position: fixed;

  right: 18px;
  bottom: 18px;

  z-index: 12000;

  min-width: 260px;
  max-width: min(390px, calc(100vw - 30px));

  display: flex;
  align-items: center;

  gap: 9px;

  padding: 10px 12px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 20%,
      var(--border)
    );

  border-radius: 9px;

  background: var(--panel);
  color: var(--text);

  font-size: 10px;
  font-weight: 600;

  opacity: 0;

  transform: translateY(8px);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease;

  box-shadow: none;
}

.performance-toast.is-visible {
  opacity: 1;

  transform: translateY(0);
}

.performance-toast__icon {
  width: 28px;
  height: 28px;

  flex: 0 0 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--text) 16%,
      var(--border)
    );

  border-radius: 7px;

  background: var(--background);
}

.performance-toast--error {
  border-color: color-mix(
    in srgb,
    #b42318 32%,
    var(--border)
  );
}

.performance-toast--error .performance-toast__icon {
  color: #b42318;
}

/* =========================================================
   DARK
   ========================================================= */

:root[data-theme="dark"] .performance-page,
[data-theme="dark"] .performance-page {
  background: #080808;
}

:root[data-theme="dark"] .performance-head,
:root[data-theme="dark"] .performance-metrics,
:root[data-theme="dark"] .performance-tabs,
:root[data-theme="dark"] .performance-panel,
:root[data-theme="dark"] .performance-objectives-panel,
:root[data-theme="dark"] .performance-modal,
:root[data-theme="dark"] .performance-modal__head,
:root[data-theme="dark"] .performance-modal__footer,
:root[data-theme="dark"] .performance-detail-footer,
:root[data-theme="dark"] .performance-pagination,
:root[data-theme="dark"] .performance-toast,
[data-theme="dark"] .performance-head,
[data-theme="dark"] .performance-metrics,
[data-theme="dark"] .performance-tabs,
[data-theme="dark"] .performance-panel,
[data-theme="dark"] .performance-objectives-panel,
[data-theme="dark"] .performance-modal,
[data-theme="dark"] .performance-modal__head,
[data-theme="dark"] .performance-modal__footer,
[data-theme="dark"] .performance-detail-footer,
[data-theme="dark"] .performance-pagination,
[data-theme="dark"] .performance-toast {
  background: #0c0c0c;

  border-color: #343434;
}

:root[data-theme="dark"] .performance-table th,
:root[data-theme="dark"] .performance-table td,
:root[data-theme="dark"] .performance-form-section,
:root[data-theme="dark"] .performance-detail-section,
:root[data-theme="dark"] .performance-detail-summary,
:root[data-theme="dark"] .performance-detail-summary article,
:root[data-theme="dark"] .performance-detail-feedback,
:root[data-theme="dark"] .performance-detail-feedback article,
[data-theme="dark"] .performance-table th,
[data-theme="dark"] .performance-table td,
[data-theme="dark"] .performance-form-section,
[data-theme="dark"] .performance-detail-section,
[data-theme="dark"] .performance-detail-summary,
[data-theme="dark"] .performance-detail-summary article,
[data-theme="dark"] .performance-detail-feedback,
[data-theme="dark"] .performance-detail-feedback article {
  border-color: #2d2d2d;
}

/* =========================================================
   RESPONSIVE · 1420
   ========================================================= */

@media (max-width: 1420px) {
  .performance-head {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .performance-head__status {
    display: none;
  }

  .performance-metrics {
    grid-template-columns: repeat(
      3,
      minmax(0, 1fr)
    );
  }

  .performance-metric {
    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 18%,
        var(--border)
      );
  }

  .performance-metric:nth-child(3n) {
    border-right: 0;
  }

  .performance-metric:nth-last-child(-n + 3) {
    border-bottom: 0;
  }
}

/* =========================================================
   RESPONSIVE · 1100
   ========================================================= */

@media (max-width: 1100px) {
  .performance-head {
    align-items: start;
  }

  .performance-filters-grid {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );
  }

  .performance-form-grid {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );
  }

  .performance-objective-overview,
  .performance-objectives-list,
  .performance-criteria-summary {
    grid-template-columns: 1fr;
  }

  .performance-objectives-head {
    align-items: flex-start;

    flex-direction: column;
  }
}

/* =========================================================
   RESPONSIVE · 820
   ========================================================= */

@media (max-width: 820px) {
  .performance-page {
    gap: 8px;

    padding: 6px;
  }

  .performance-head {
    display: flex;
    flex-direction: column;

    align-items: stretch;

    padding: 13px;
  }

  .performance-head__actions {
    width: 100%;

    justify-content: flex-start;
  }

  .performance-head__actions .performance-btn {
    flex: 1;
  }

  .performance-metrics {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );
  }

  .performance-metric {
    border-right: 1px solid
      color-mix(
        in srgb,
        var(--text) 18%,
        var(--border)
      );

    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 18%,
        var(--border)
      );
  }

  .performance-metric:nth-child(2n) {
    border-right: 0;
  }

  .performance-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .performance-search-row {
    grid-template-columns: 1fr;
  }

  .performance-search-row > .performance-btn {
    width: 100%;
  }

  .performance-table-wrap {
    overflow: visible;
  }

  .performance-table {
    min-width: 0;

    display: block;
  }

  .performance-table thead {
    display: none;
  }

  .performance-table tbody {
    display: grid;

    grid-template-columns: 1fr;

    gap: 8px;

    padding: 9px;
  }

  .performance-table tr {
    display: grid;

    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );

    border: 1px solid
      color-mix(
        in srgb,
        var(--text) 20%,
        var(--border)
      );

    border-radius: 10px;

    overflow: hidden;
  }

  .performance-table td {
    min-height: 54px;
    height: auto;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    gap: 5px;

    padding: 9px 10px;

    border-right: 1px solid
      color-mix(
        in srgb,
        var(--text) 16%,
        var(--border)
      );

    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 16%,
        var(--border)
      );
  }

  .performance-table td::before {
    display: block;

    color: var(--muted);

    font-size: 8px;
    font-weight: 750;

    letter-spacing: 0.06em;

    text-transform: uppercase;
  }

  .performance-table td:nth-child(1)::before {
    content: "Empleado";
  }

  .performance-table td:nth-child(2)::before {
    content: "Sector";
  }

  .performance-table td:nth-child(3)::before {
    content: "Puesto";
  }

  .performance-table td:nth-child(4)::before {
    content: "Período";
  }

  .performance-table td:nth-child(5)::before {
    content: "Puntaje";
  }

  .performance-table td:nth-child(6)::before {
    content: "Nivel";
  }

  .performance-table td:nth-child(7)::before {
    content: "Estado";
  }

  .performance-table td:nth-child(8)::before {
    content: "Criterios";
  }

  .performance-table td:nth-child(9)::before {
    content: "Objetivos";
  }

  .performance-table td:nth-child(10)::before {
    content: "Acciones";
  }

  .performance-table td:nth-child(2n) {
    border-right: 0;
  }

  .performance-table td:last-child {
    grid-column: 1 / -1;

    border-right: 0;
    border-bottom: 0;
  }

  .performance-modal-backdrop {
    align-items: flex-end;

    padding: 0;
  }

  .performance-modal,
  .performance-modal--small,
  .performance-modal--detail,
  .performance-modal--history,
  .performance-modal--score {
    width: 100%;
    max-height: 92vh;

    border-right: 0;
    border-bottom: 0;
    border-left: 0;

    border-radius: 16px 16px 0 0;
  }

  .performance-form-grid {
    grid-template-columns: 1fr;
  }

  .performance-field--full {
    grid-column: auto;
  }

  .performance-modal__footer {
    flex-direction: column;

    align-items: stretch;
  }

  .performance-modal__footer > div {
    width: 100%;

    margin-left: 0;
  }

  .performance-modal__footer > div .performance-btn {
    flex: 1;
  }

  .performance-detail-summary {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );
  }

  .performance-detail-summary article:nth-child(2n) {
    border-right: 0;
  }

  .performance-detail-feedback {
    grid-template-columns: 1fr;
  }

  .performance-detail-feedback article {
    border-right: 0;
    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 18%,
        var(--border)
      );
  }

  .performance-detail-feedback article:last-child {
    border-bottom: 0;
  }

  .performance-score-item {
    grid-template-columns: 1fr;
  }

  .performance-score-item__values {
    justify-content: flex-start;
  }
}

/* =========================================================
   RESPONSIVE · 620
   ========================================================= */

@media (max-width: 620px) {
  .performance-page {
    padding: 5px;
  }

  .performance-brand h2 {
    font-size: 21px;
  }

  .performance-brand p {
    font-size: 10px;
  }

  .performance-head__actions {
    display: grid;

    grid-template-columns: 1fr;
  }

  .performance-head__actions .performance-btn {
    width: 100%;
  }

  .performance-metrics {
    grid-template-columns: 1fr;
  }

  .performance-metric {
    min-height: 82px;

    grid-template-columns:
      34px
      minmax(0, 1fr)
      18px;

    padding: 10px;

    border-right: 0 !important;

    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 18%,
        var(--border)
      ) !important;
  }

  .performance-metric:last-child {
    border-bottom: 0 !important;
  }

  .performance-filters__head {
    align-items: stretch;

    flex-direction: column;
  }

  .performance-filters__summary > span {
    display: none;
  }

  .performance-filters__summary .performance-btn {
    width: 100%;
  }

  .performance-filters-grid {
    grid-template-columns: 1fr;
  }

  .performance-filters__footer {
    flex-direction: column;

    align-items: stretch;
  }

  .performance-filters__footer .performance-btn {
    width: 100%;
  }

  .performance-table tbody {
    padding: 7px;
  }

  .performance-table tr {
    grid-template-columns: 1fr;
  }

  .performance-table td,
  .performance-table td:nth-child(2n) {
    border-right: 0;

    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 16%,
        var(--border)
      );
  }

  .performance-table td:last-child {
    grid-column: auto;

    border-bottom: 0;
  }

  .performance-row-actions {
    display: grid;

    grid-template-columns: repeat(
      3,
      minmax(0, 1fr)
    );

    width: 100%;
  }

  .performance-icon-btn {
    width: 100%;
    height: 32px;
  }

  .performance-pagination {
    flex-direction: column;

    align-items: stretch;
  }

  .performance-pagination__actions {
    justify-content: space-between;
  }

  .performance-objectives-summary {
    width: 100%;

    grid-template-columns: repeat(
      3,
      1fr
    );
  }

  .performance-objective-overview {
    grid-template-columns: 1fr;

    padding: 8px;
  }

  .performance-score-scale {
    grid-template-columns: 1fr;
  }

  .performance-score-scale span {
    min-height: 34px;

    flex-direction: row;

    justify-content: flex-start;

    gap: 7px;

    padding: 6px 10px;

    border-right: 0;

    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 14%,
        var(--border)
      );
  }

  .performance-score-scale span:last-child {
    border-bottom: 0;
  }

  .performance-score-item__values {
    display: grid;

    grid-template-columns: repeat(
      5,
      1fr
    );

    width: 100%;
  }

  .performance-score-item__values label span {
    width: 100%;
  }

  .performance-history-item__copy > div:first-child {
    align-items: flex-start;

    flex-direction: column;
  }

  .performance-toast {
    right: 10px;
    bottom: 10px;
    left: 10px;

    min-width: 0;
    max-width: none;
  }
}

/* =========================================================
   RESPONSIVE · 420
   ========================================================= */

@media (max-width: 420px) {
  .performance-btn {
    min-height: 34px;

    font-size: 10px;
  }

  .performance-row-actions {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );
  }

  .performance-detail-summary {
    grid-template-columns: 1fr;
  }

  .performance-detail-summary article {
    border-right: 0;

    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 18%,
        var(--border)
      );
  }

  .performance-detail-summary article:last-child {
    border-bottom: 0;
  }

  .performance-objectives-summary {
    grid-template-columns: 1fr;
  }

  .performance-objectives-summary article {
    border-right: 0;

    border-bottom: 1px solid
      color-mix(
        in srgb,
        var(--text) 14%,
        var(--border)
      );
  }

  .performance-objectives-summary article:last-child {
    border-bottom: 0;
  }

  .performance-modal__brand p {
    display: none;
  }

  .performance-modal__footer > div {
    flex-direction: column;
  }

  .performance-modal__footer > div .performance-btn {
    width: 100%;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .performance-page,
  .performance-modal,
  .performance-toast,
  .performance-btn,
  .performance-icon-btn,
  .performance-metric,
  .performance-tab {
    animation: none !important;

    transition: none !important;
  }

  .performance-spin {
    animation: performanceSpin 1.2s linear infinite !important;
  }
}