
/* ============================================================
   ISCP · Personal técnico
   Compacto + legible
   ============================================================ */

.tech-admin {
  gap: 12px;
  padding-top: 10px;
}

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

.platform-header.compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;

  padding-top: 18px;
  padding-bottom: 18px;
}

.tech-header-title {
  min-width: 0;
}

.tech-header-title .brand-kicker {
  display: block;
  margin-bottom: 5px;

  font-size: 12px;
  letter-spacing: 1.3px;
}

.tech-header-title h1 {
  margin: 0;

  font-size: 30px;
  line-height: 1.08;
  font-weight: 750;
}

.tech-header-title p {
  margin: 6px 0 0;

  color: #86a9c1;
  font-size: 14px;
  line-height: 1.3;
}

.tech-header-action {
  width: auto !important;
  min-width: 165px;
  min-height: 42px;

  margin: 0;
  padding: 8px 17px;

  font-size: 14px;
  white-space: nowrap;
}

/* ============================================================
   RESUMEN + BUSCADOR
   ============================================================ */

.tech-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  min-height: 62px;
  padding: 11px 15px;

  background: #0f2a3d;
  border: 1px solid #214b67;
  border-radius: 13px;
}

.tech-summary {
  display: flex;
  align-items: center;
  gap: 6px;

  min-width: 0;

  color: #91aec3;
  font-size: 13px;
}

.tech-summary strong {
  color: #ffffff;

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

.tech-summary span {
  white-space: nowrap;
}

.tech-summary i {
  display: block;

  width: 1px;
  height: 22px;

  margin: 0 10px;

  background: #36576d;
}

.tech-search {
  width: 280px;
  min-height: 40px;

  padding: 8px 12px;

  color: #eaf4fb;
  background: #071d2a;

  border: 1px solid #31566e;
  border-radius: 9px;

  font: inherit;
  font-size: 13px;

  outline: none;
}

.tech-search::placeholder {
  color: #718fa4;
}

.tech-search:focus {
  border-color: #2994e2;
  box-shadow:
    0 0 0 2px rgba(41, 148, 226, .12);
}

/* ============================================================
   LISTA
   ============================================================ */

.tech-list {
  display: grid;
  gap: 8px;
}

.tech-row {
  display: grid;

  grid-template-columns:
    minmax(300px, 1.8fr)
    115px
    105px
    105px
    auto;

  align-items: center;
  gap: 16px;

  min-height: 68px;

  padding: 11px 14px;

  background: #0f2a3d;

  border: 1px solid #214b67;
  border-radius: 12px;

  transition:
    background .15s ease,
    border-color .15s ease;
}

.tech-row:hover {
  background: #123149;
  border-color: #326482;
}

/* ============================================================
   IDENTIDAD
   ============================================================ */

.tech-row-identity {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.tech-row-identity strong {
  overflow: hidden;

  color: #ffffff;

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

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

.tech-row-identity span {
  overflow: hidden;

  color: #82a3ba;

  font-size: 12px;

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

/* ============================================================
   ESTADO
   ============================================================ */

.tech-row-state {
  display: flex;
  align-items: center;
}

.tech-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: #9bb7ca;

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

.tech-status > span {
  width: 8px;
  height: 8px;

  flex: 0 0 auto;

  background: #7891a3;
  border-radius: 50%;
}

.tech-status.is-active {
  color: #6fe0bd;
}

.tech-status.is-active > span {
  background: #20d5a5;

  box-shadow:
    0 0 8px rgba(32, 213, 165, .55);
}

.tech-status.is-inactive {
  color: #94a8b6;
}

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

.tech-row-metric {
  display: flex;
  align-items: baseline;
  gap: 5px;

  color: #83a1b6;

  white-space: nowrap;
}

.tech-row-metric strong {
  color: #ffffff;

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

.tech-row-metric span {
  font-size: 12px;
}

/* ============================================================
   BOTÓN ADMINISTRAR
   ============================================================ */

.tech-row-action {
  width: auto !important;

  min-width: 92px;
  min-height: 36px;

  margin: 0;
  padding: 6px 13px;

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

  white-space: nowrap;
}

/* ============================================================
   VACÍO / ERROR
   ============================================================ */

.tech-empty {
  padding: 24px;

  color: #82a3ba;
  background: #0f2a3d;

  border: 1px solid #214b67;
  border-radius: 12px;

  text-align: center;
  font-size: 13px;
}

/* ============================================================
   DASHBOARD · HERRAMIENTAS TÉCNICAS
   ============================================================ */

.technical-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.technical-actions button {
  width: auto;

  min-height: 38px;
  padding: 7px 13px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 760px) {

  .platform-header.compact {
    grid-template-columns:
      auto minmax(0, 1fr);
  }

  .tech-header-title h1 {
    font-size: 25px;
  }

  .tech-header-action {
    grid-column: 1 / -1;

    width: 100% !important;
  }

  .tech-toolbar {
    align-items: stretch;
    flex-direction: column;

    gap: 10px;
  }

  .tech-summary {
    overflow-x: auto;

    padding-bottom: 3px;
  }

  .tech-search {
    width: 100%;
  }

  .tech-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;

    min-height: 72px;
  }

  .tech-row-state {
    justify-content: flex-end;
  }

  .tech-row-metric {
    display: none;
  }

  .tech-row-action {
    grid-column: 2;
  }
}


/* ============================================================
   DETALLE DE TÉCNICO
   ============================================================ */

.tech-detail {
  gap: 10px;
  padding-top: 8px;
}

.tech-detail-summary {
  display: flex;
  align-items: center;
  gap: 8px;

  min-height: 54px;
  padding: 9px 14px;

  background: #0f2a3d;
  border: 1px solid #214b67;
  border-radius: 12px;
}

.tech-detail-summary > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.tech-detail-summary strong {
  color: #fff;
  font-size: 17px;
}

.tech-detail-summary span {
  color: #8ba9bd;
  font-size: 12px;
}

.tech-detail-summary i {
  width: 1px;
  height: 20px;
  margin: 0 7px;
  background: #35566d;
}

.tech-compact-button {
  width: auto !important;
  min-height: 36px;
  margin-left: auto;
  padding: 6px 13px;
  font-size: 12px;
}

.tech-detail-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1.25fr);
  gap: 10px;
}

.tech-detail-panel {
  overflow: hidden;

  background: #0f2a3d;
  border: 1px solid #214b67;
  border-radius: 12px;
}

.tech-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 56px;
  padding: 9px 13px;

  border-bottom: 1px solid #21445c;
}

.tech-panel-heading h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 15px;
}

.tech-count {
  min-width: 28px;
  padding: 4px 8px;

  color: #9fc0d6;
  background: #092336;
  border-radius: 999px;

  text-align: center;
  font-size: 11px;
}

.tech-compact-list {
  display: grid;
}

.tech-compact-row,
.tech-access-row {
  display: grid;
  align-items: center;
  gap: 10px;

  min-height: 58px;
  padding: 9px 13px;

  border-bottom: 1px solid #193c53;
}

.tech-compact-row:last-child,
.tech-access-row:last-child {
  border-bottom: 0;
}

.tech-compact-row {
  grid-template-columns:
    minmax(0, 1fr)
    auto;
}

.tech-access-row {
  grid-template-columns:
    minmax(0, 1fr)
    auto
    auto;
}

.tech-compact-row > div,
.tech-access-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tech-compact-row strong,
.tech-access-main strong {
  overflow: hidden;

  color: #fff;
  font-size: 13px;

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

.tech-compact-row span:not(.tech-pill),
.tech-access-main span {
  overflow: hidden;

  color: #7fa1b8;
  font-size: 11px;

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

.tech-access-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.tech-access-meta small {
  color: #7898ae;
  font-size: 10px;
  white-space: nowrap;
}

.tech-pill {
  display: inline-flex;
  align-items: center;

  padding: 3px 7px;

  color: #9dbbd0;
  background: #092438;
  border-radius: 999px;

  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.tech-pill.active {
  color: #6fe0bd;
  background: rgba(32, 213, 165, .10);
}

.tech-pill.revoked {
  color: #ef9a9a;
  background: rgba(239, 90, 90, .10);
}

.tech-pill.expired {
  color: #d7b879;
  background: rgba(215, 184, 121, .10);
}

.tech-revoke-button {
  width: auto !important;
  min-height: 32px;
  margin: 0;
  padding: 5px 9px;
  font-size: 10px;
}

.tech-panel-empty {
  padding: 18px 13px;
  color: #7898ae;
  font-size: 12px;
}

.tech-history-panel {
  margin-top: 0;
}

.tech-history-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  min-height: 46px;

  padding: 8px 13px;

  color: #dcecf7;
  background: transparent;
  border: 0;

  font: inherit;
  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}

.tech-history-content {
  border-top: 1px solid #21445c;
}

.tech-history-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    120px;
  align-items: center;
  gap: 12px;

  min-height: 46px;
  padding: 7px 13px;

  border-bottom: 1px solid #193c53;
}

.tech-history-row:last-child {
  border-bottom: 0;
}

.tech-history-row > div {
  display: grid;
  gap: 1px;
}

.tech-history-row strong {
  color: #e7f1f8;
  font-size: 11px;
}

.tech-history-row span:not(.tech-pill),
.tech-history-row small {
  color: #7898ae;
  font-size: 10px;
}

@media (max-width: 760px) {
  .tech-detail-summary {
    overflow-x: auto;
  }

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

  .tech-access-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .tech-revoke-button {
    grid-column: 2;
  }

  .tech-history-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .tech-history-row small {
    display: none;
  }
}

/* ============================================================
   MODAL CONCEDER ACCESO
   ============================================================ */

.tech-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: grid;
  place-items: center;

  padding: 20px;

  background:
    rgba(2, 12, 20, .72);

  backdrop-filter:
    blur(3px);
}

.tech-modal {
  width:
    min(520px, 100%);

  overflow: hidden;

  background:
    #0f2a3d;

  border:
    1px solid #28516c;

  border-radius:
    14px;

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, .35);
}

.tech-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  padding: 15px 17px 12px;

  border-bottom:
    1px solid #21445c;
}

.tech-modal-header h2 {
  margin:
    3px 0 0;

  color: #fff;

  font-size: 19px;
}

.tech-modal-header p {
  margin:
    3px 0 0;

  color: #83a3b9;

  font-size: 12px;
}

.tech-modal-close {
  width: 32px;
  height: 32px;

  flex:
    0 0 auto;

  color: #a8c0d0;
  background: #092438;

  border: 1px solid #294d65;
  border-radius: 8px;

  font-size: 20px;
  line-height: 1;

  cursor: pointer;
}

.tech-modal-form {
  display: grid;
  gap: 12px;

  padding:
    15px 17px 17px;
}

.tech-modal-form .field {
  gap: 5px;
}

.tech-modal-form .field > span {
  font-size: 11px;
}

.tech-modal-form select {
  min-height: 40px;
}

.tech-modal-two-columns {
  display: grid;
  grid-template-columns:
    1fr 1fr;

  gap: 10px;
}

.tech-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  margin-top: 2px;
}

.tech-modal-actions button {
  width: auto;
  min-height: 38px;
  margin: 0;

  padding:
    7px 13px;
}

@media (max-width: 540px) {
  .tech-modal-two-columns {
    grid-template-columns:
      1fr;
  }

  .tech-modal-actions {
    display: grid;
    grid-template-columns:
      1fr 1fr;
  }
}

.tech-panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tech-mini-action {
  width: auto !important;
  min-height: 30px;
  margin: 0;
  padding: 4px 8px;
  font-size: 10px;
}

.tech-customer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tech-remove-customer {
  width: auto !important;
  min-height: 29px;
  margin: 0;
  padding: 4px 7px;
  font-size: 9px;
}

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

.tech-modal-note {
  margin: 0;

  color: #7898ae;
  font-size: 11px;
  line-height: 1.45;
}

/* Invitación de personal técnico */

.tech-invite-success {
  display: grid;
  gap: 13px;

  padding: 15px 17px 17px;
}

.tech-invite-success-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-invite-success-title strong {
  display: block;

  color: #fff;
  font-size: 14px;
}

.tech-invite-success-title span:not(
  .tech-invite-success-icon
) {
  display: block;

  margin-top: 2px;

  color: #83a3b9;
  font-size: 11px;
}

.tech-invite-success-icon {
  display: grid;
  place-items: center;

  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  border:
    1px solid rgba(86, 211, 149, .45);

  border-radius: 50%;

  color: #72dda7;
  background:
    rgba(86, 211, 149, .10);

  font-size: 16px;
  font-weight: 800;
}

.tech-invite-result {
  display: grid;
  grid-template-columns:
    minmax(0, 1.7fr)
    minmax(70px, .65fr)
    minmax(120px, 1fr);

  gap: 1px;

  overflow: hidden;

  border:
    1px solid #21445c;

  border-radius: 9px;

  background: #21445c;
}

.tech-invite-result > div {
  min-width: 0;

  padding: 9px 10px;

  background: #0b2537;
}

.tech-invite-result span {
  display: block;

  margin-bottom: 3px;

  color: #7898ae;
  font-size: 9px;

  text-transform: uppercase;
  letter-spacing: .04em;
}

.tech-invite-result strong {
  display: block;

  overflow: hidden;

  color: #eaf4fa;

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

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

.tech-copy-invite {
  width: 100%;
  min-height: 39px;
  margin: 0;
}

@media (max-width: 540px) {
  .tech-invite-result {
    grid-template-columns: 1fr;
  }
}
