.tecnicos-page {
  width:
    100%;

  max-width:
    1700px;

  margin:
    0 auto;

  padding:
    32px;
}

.tecnicos-page__header {
  display:
    flex;

  align-items:
    flex-end;

  justify-content:
    space-between;

  gap:
    24px;

  margin-bottom:
    24px;
}

.tecnicos-page__header h1 {
  margin:
    6px 0;

  font-size:
    32px;
}

.tecnicos-page__header p {
  margin:
    0;

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

.tecnicos-panel {
  overflow:
    hidden;

  border:
    1px solid var(--border);

  border-radius:
    14px;

  background:
    var(--surface);
}

.tecnicos-filters {
  display:
    grid;

  grid-template-columns:
    minmax(260px, 1fr) 170px 190px 180px auto;

  align-items:
    end;

  gap:
    14px;

  padding:
    20px;

  border-bottom:
    1px solid var(--border);

  background:
    var(--surface-muted);
}

.tecnicos-table-header {
  display:
    flex;

  align-items:
    center;

  min-height:
    54px;

  padding:
    0 20px;

  border-bottom:
    1px solid var(--border);
}

.tecnicos-table-header strong {
  font-size:
    14px;
}

.tecnicos-table-wrapper {
  width:
    100%;

  overflow-x:
    auto;
}

.tecnicos-table {
  width:
    100%;

  min-width:
    1350px;

  border-collapse:
    collapse;
}

.tecnicos-table th,
.tecnicos-table td {
  padding:
    14px 16px;

  border-bottom:
    1px solid var(--border);

  text-align:
    left;

  vertical-align:
    middle;
}

.tecnicos-table th {
  background:
    #fafbf8;

  color:
    var(--text-muted);

  font-size:
    11px;

  font-weight:
    800;

  letter-spacing:
    0.05em;

  text-transform:
    uppercase;
}

.tecnicos-table td {
  font-size:
    13px;
}

.tecnicos-table tbody tr:hover {
  background:
    #fafbf8;
}

.tecnico-identity {
  display:
    flex;

  align-items:
    center;

  gap:
    11px;
}

.tecnico-avatar,
.detail-avatar {
  display:
    grid;

  flex:
    0 0 auto;

  width:
    40px;

  height:
    40px;

  place-items:
    center;

  border:
    1px solid var(--border);

  border-radius:
    10px;

  background:
    var(--accent-soft);

  color:
    var(--accent-dark);

  font-size:
    12px;

  font-weight:
    800;
}

.tecnico-identity strong,
.tecnico-identity span,
.tecnico-contact strong,
.tecnico-contact span,
.tecnico-location strong,
.tecnico-location span {
  display:
    block;
}

.tecnico-identity span,
.tecnico-contact span,
.tecnico-location span {
  margin-top:
    3px;

  color:
    var(--text-muted);

  font-size:
    11px;
}

.availability-badge {
  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  min-height:
    27px;

  padding:
    0 10px;

  border:
    1px solid var(--border);

  border-radius:
    999px;

  font-size:
    10px;

  font-weight:
    800;

  letter-spacing:
    0.03em;
}

.availability-badge--disponible {
  border-color:
    #b8cfaf;

  background:
    #edf5e9;

  color:
    #456b39;
}

.availability-badge--ocupado {
  border-color:
    #dccb9f;

  background:
    #fff8e8;

  color:
    #846c2d;
}

.availability-badge--no-disponible,
.availability-badge--licencia {
  border-color:
    #d2c4c0;

  background:
    #f6f2f0;

  color:
    #705f5a;
}

.tecnicos-empty {
  height:
    180px;

  color:
    var(--text-muted);

  text-align:
    center !important;
}

.tecnicos-empty--error {
  color:
    #963f3a;
}

.tecnicos-pagination {
  display:
    flex;

  align-items:
    center;

  justify-content:
    flex-end;

  gap:
    14px;

  min-height:
    66px;

  padding:
    12px 20px;
}

.tecnicos-pagination span {
  color:
    var(--text-muted);

  font-size:
    12px;

  font-weight:
    600;
}

.tecnicos-message {
  margin-bottom:
    16px;

  padding:
    13px 16px;

  border:
    1px solid var(--border);

  border-radius:
    10px;

  font-size:
    13px;

  font-weight:
    600;
}

.tecnicos-message--success {
  border-color:
    #b8cfaf;

  background:
    #edf5e9;

  color:
    #456b39;
}

.tecnicos-message--error {
  border-color:
    #d5b9b7;

  background:
    #fff2f1;

  color:
    #8f423e;
}

.tecnicos-modal {
  position:
    fixed;

  z-index:
    1000;

  inset:
    0;

  display:
    grid;

  place-items:
    center;

  padding:
    24px;
}

.tecnicos-modal__backdrop {
  position:
    absolute;

  inset:
    0;

  background:
    rgba(25, 30, 24, 0.56);
}

.tecnicos-modal__dialog {
  position:
    relative;

  z-index:
    1;

  width:
    min(900px, 100%);

  max-height:
    calc(100vh - 48px);

  overflow-y:
    auto;

  border:
    1px solid var(--border);

  border-radius:
    15px;

  background:
    var(--surface);
}

.tecnicos-modal__header {
  position:
    sticky;

  z-index:
    2;

  top:
    0;

  display:
    flex;

  align-items:
    flex-start;

  justify-content:
    space-between;

  gap:
    20px;

  padding:
    22px 24px;

  border-bottom:
    1px solid var(--border);

  background:
    var(--surface);
}

.tecnicos-modal__header span {
  color:
    var(--accent);

  font-size:
    10px;

  font-weight:
    800;

  letter-spacing:
    0.1em;
}

.tecnicos-modal__header h2 {
  margin:
    5px 0 0;

  font-size:
    22px;
}

.tecnico-form {
  padding:
    24px;
}

.form-section {
  margin-bottom:
    28px;

  padding-bottom:
    28px;

  border-bottom:
    1px solid var(--border);
}

.form-section:last-of-type {
  margin-bottom:
    0;

  padding-bottom:
    0;

  border-bottom:
    0;
}

.form-section__header {
  margin-bottom:
    17px;
}

.form-section__header span {
  color:
    var(--accent);

  font-size:
    10px;

  font-weight:
    800;

  letter-spacing:
    0.08em;
}

.form-section__header h3 {
  margin:
    4px 0 0;

  font-size:
    17px;
}

.tecnico-form textarea {
  width:
    100%;

  padding:
    12px 14px;

  border:
    1px solid var(--border-strong);

  border-radius:
    10px;

  outline:
    none;

  resize:
    vertical;

  background:
    var(--surface);

  color:
    var(--text);
}

.tecnico-form textarea:focus {
  border-color:
    var(--accent);
}

.especialidades-grid {
  display:
    grid;

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

  gap:
    10px;
}

.especialidad-option {
  display:
    flex;

  align-items:
    center;

  gap:
    9px;

  min-height:
    42px;

  padding:
    10px 12px;

  border:
    1px solid var(--border);

  border-radius:
    9px;

  background:
    var(--surface-muted);

  cursor:
    pointer;
}

.especialidad-option input {
  width:
    16px;

  height:
    16px;

  accent-color:
    var(--accent);
}

.especialidad-option span {
  font-size:
    12px;

  font-weight:
    700;
}

.tecnicos-modal__footer {
  display:
    flex;

  align-items:
    center;

  justify-content:
    flex-end;

  gap:
    10px;

  padding:
    18px 24px;

  border-top:
    1px solid var(--border);

  background:
    #fafbf8;
}

.tecnico-form > .tecnicos-modal__footer {
  margin:
    24px -24px -24px;
}

.tecnico-detail {
  padding:
    24px;
}

.detail-summary {
  display:
    flex;

  align-items:
    center;

  gap:
    14px;

  padding:
    18px;

  border:
    1px solid var(--border);

  border-radius:
    12px;

  background:
    var(--surface-muted);
}

.detail-avatar {
  width:
    54px;

  height:
    54px;

  font-size:
    15px;
}

.detail-summary strong,
.detail-summary span {
  display:
    block;
}

.detail-summary strong {
  font-size:
    18px;
}

.detail-summary span {
  margin-top:
    4px;

  color:
    var(--text-muted);

  font-size:
    12px;
}

.detail-grid {
  display:
    grid;

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

  gap:
    0;

  margin-top:
    22px;

  border:
    1px solid var(--border);

  border-radius:
    12px;

  overflow:
    hidden;
}

.detail-grid > div {
  min-height:
    78px;

  padding:
    15px;

  border-right:
    1px solid var(--border);

  border-bottom:
    1px solid var(--border);
}

.detail-grid > div:nth-child(even) {
  border-right:
    0;
}

.detail-grid > div:last-child,
.detail-grid > div:nth-last-child(2) {
  border-bottom:
    0;
}

.detail-grid__full {
  grid-column:
    1 /
    -1;

  border-right:
    0 !important;
}

.detail-grid span,
.detail-grid strong {
  display:
    block;
}

.detail-grid span {
  color:
    var(--text-muted);

  font-size:
    11px;

  font-weight:
    700;

  text-transform:
    uppercase;
}

.detail-grid strong {
  margin-top:
    7px;

  font-size:
    13px;

  line-height:
    1.5;
}

@media (
  max-width: 1250px
) {
  .tecnicos-filters {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .filter-field--search {
    grid-column:
      1 /
      -1;
  }
}

@media (
  max-width: 780px
) {
  .tecnicos-page {
    padding:
      20px;
  }

  .tecnicos-page__header {
    align-items:
      stretch;

    flex-direction:
      column;
  }

  .tecnicos-page__header .primary-button {
    width:
      100%;
  }

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

  .filter-field--search {
    grid-column:
      auto;
  }

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

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

  .detail-grid > div {
    border-right:
      0;
  }

  .detail-grid > div:nth-last-child(2) {
    border-bottom:
      1px solid var(--border);
  }
}

@media (
  max-width: 520px
) {
  .tecnicos-page {
    padding:
      14px;
  }

  .tecnicos-modal {
    align-items:
      end;

    padding:
      0;
  }

  .tecnicos-modal__dialog {
    width:
      100%;

    max-height:
      94vh;

    border-right:
      0;

    border-bottom:
      0;

    border-left:
      0;

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

  .especialidades-grid {
    grid-template-columns:
      1fr;
  }

  .tecnicos-modal__footer {
    align-items:
      stretch;

    flex-direction:
      column-reverse;
  }

  .tecnicos-modal__footer button {
    width:
      100%;
  }
}

/* =========================================================
   AGRO INTEL · TÉCNICOS A TODO EL ANCHO
   ========================================================= */

#page-content {
  width: 100%;
  max-width: none;
}

.technicians-page,
.tecnicos-page,
.technicians-container,
.tecnicos-container,
.technicians-content,
.tecnicos-content,
.technicians-list,
.tecnicos-list,
.technicians-detail,
.tecnicos-detail {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.technicians-page,
.tecnicos-page {
  padding:
    24px
    18px;
}

.technicians-page > *,
.tecnicos-page > *,
.technicians-container > *,
.tecnicos-container > *,
.technicians-content > *,
.tecnicos-content > * {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.technicians-header,
.tecnicos-header,
.technicians-filters,
.tecnicos-filters,
.technicians-table-container,
.tecnicos-table-container,
.technicians-panel,
.tecnicos-panel,
.technicians-card,
.tecnicos-card {
  width: 100%;
  max-width: none;
  min-width: 0;
}

@media (min-width: 821px) {
  .technicians-page,
  .tecnicos-page {
    width: 100%;
    padding:
      24px
      28px;
  }

  body.sidebar-desktop-collapsed
  .technicians-page,
  body.sidebar-desktop-collapsed
  .tecnicos-page {
    padding-inline:
      32px;
  }
}

@media (max-width: 820px) {
  .technicians-page,
  .tecnicos-page {
    width: 100%;
    max-width: 100%;
    padding:
      16px
      12px;
  }

  .technicians-page > *,
  .tecnicos-page > *,
  .technicians-container > *,
  .tecnicos-container > *,
  .technicians-content > *,
  .tecnicos-content > * {
    width: 100%;
    max-width: 100%;
  }
}
