/* =====================================================
   NECESIDADES
   SOLO ESTILOS DEL CONTENIDO INTERNO
   EL SIDEBAR Y TOPBAR LOS CONTROLA style.css
===================================================== */

/* =====================================================
   MATCH BUTTON
===================================================== */
.needs-match-btn {
  margin-top: 10px;
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--accent, #0071e3);
  background: transparent;
  color: var(--accent, #0071e3);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background .15s, color .15s;
}
.needs-match-btn:hover { background: var(--accent, #0071e3); color: #fff; }

/* =====================================================
   MATCH MODAL
===================================================== */
.match-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.match-modal {
  background: var(--bg-primary, #fff);
  border-radius: 18px;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.match-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--separator, #e5e5ea);
  font-weight: 700;
  font-size: 15px;
  gap: 10px;
}
.match-modal-head i { color: var(--accent, #0071e3); margin-right: 6px; }
.match-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--label-secondary, #8e8e93);
  font-size: 18px;
  padding: 2px 6px;
  border-radius: 6px;
}
.match-modal-close:hover { background: var(--bg-secondary, #f5f5f7); }
.match-modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.match-candidate {
  border: 1px solid var(--separator, #e5e5ea);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-secondary, #f5f5f7);
  position: relative;
}
.match-candidate.match-top { border-color: var(--accent, #0071e3); background: color-mix(in srgb, var(--accent,#0071e3) 5%, var(--bg-primary,#fff)); }
.match-cand-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.match-cand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent, #0071e3);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.match-cand-info { flex: 1; min-width: 0; }
.match-cand-info strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-cand-tipo { font-size: 12px; color: var(--label-secondary, #8e8e93); }
.match-score-badge {
  color: #fff; font-size: 15px; font-weight: 800;
  min-width: 44px; text-align: center;
  padding: 4px 8px; border-radius: 8px;
}
.match-bars { display: flex; flex-direction: column; gap: 5px; }
.match-bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.match-bar-label { width: 80px; flex-shrink: 0; color: var(--label-secondary, #8e8e93); }
.match-bar-track { flex: 1; height: 6px; background: var(--separator, #e5e5ea); border-radius: 4px; overflow: hidden; }
.match-bar-fill { height: 100%; border-radius: 4px; transition: width .4s; }
.match-bar-info { font-size: 11px; color: var(--label-secondary, #8e8e93); min-width: 90px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-best-label {
  margin-top: 8px;
  font-size: 11px; font-weight: 700;
  color: var(--accent, #0071e3);
  display: flex; align-items: center; gap: 5px;
}
.needs-match-propose-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px 14px;
  background: var(--accent, #0071e3);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity .15s;
}
.needs-match-propose-btn:hover { opacity: .85; }

.needs-content {
  padding-top: 28px;
}


/* =====================================================
   HERO
===================================================== */

.needs-hero {
  display: flex;

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

  gap: 25px;

  min-height: 175px;

  padding:
    29px
    31px;

  margin-bottom: 20px;

  border:
    1px solid
    #dce7f2;

  border-radius: 23px;

  background:
    radial-gradient(
      circle at 92% 15%,
      rgba(71,183,255,.18),
      transparent 28%
    ),
    linear-gradient(
      130deg,
      #ffffff,
      #f4f9ff
    );

  box-shadow:
    0 15px 40px
    rgba(18,64,108,.05);
}


.needs-hero-copy {
  max-width: 720px;
}


.needs-badge {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  padding:
    7px
    10px;

  border:
    1px solid
    #d4e8fb;

  border-radius:
    999px;

  color:
    #1477d5;

  background:
    #eef7ff;

  font-size:
    11.5px;

  font-weight:
    800;
}


.needs-hero h1 {
  margin-top:
    13px;

  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size:
    31px;

  letter-spacing:
    -1.2px;
}


.needs-hero p {
  margin-top:
    8px;

  color:
    #6f7e91;

  font-size:
    13px;

  line-height:
    1.7;
}


.needs-hero-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 9px;
}


.primary-need-btn,
.secondary-need-btn {
  min-height:
    43px;

  display: inline-flex;

  align-items: center;

  gap: 7px;

  padding:
    0
    14px;

  border-radius:
    11px;

  cursor:
    pointer;

  font-size:
    11.5px;

  font-weight:
    800;

  white-space:
    nowrap;
}


.primary-need-btn {
  color:
    white;

  background:
    linear-gradient(
      100deg,
      #0d70d7,
      #1688ff
    );

  box-shadow:
    0 11px 24px
    rgba(22,136,255,.20);
}


.secondary-need-btn {
  color:
    #53667f;

  border:
    1px solid
    #d9e4ee;

  background:
    white;
}


/* =====================================================
   RESUMEN
===================================================== */

.needs-summary-grid {
  display: grid;

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

  gap: 15px;

  margin-bottom: 20px;
}


.needs-summary-card {
  min-height: 120px;

  display: flex;

  align-items: center;

  gap: 14px;

  padding:
    17px;

  border:
    1px solid
    #dfe8f2;

  border-radius:
    18px;

  background:
    white;

  box-shadow:
    0 11px 30px
    rgba(20,73,118,.04);
}


.needs-summary-icon {
  width: 44px;
  height: 44px;

  flex:
    0
    0
    auto;

  display: flex;

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

  border-radius:
    13px;

  font-size:
    15px;
}


.needs-summary-card.blue
.needs-summary-icon {
  color:
    #1688ff;

  background:
    #eaf5ff;
}


.needs-summary-card.red
.needs-summary-icon {
  color:
    #df5965;

  background:
    #ffedf0;
}


.needs-summary-card.orange
.needs-summary-icon {
  color:
    #df930e;

  background:
    #fff3dd;
}


.needs-summary-card.green
.needs-summary-icon {
  color:
    #159768;

  background:
    #e7f8f1;
}


.needs-summary-card span {
  display: block;

  color:
    #778599;

  font-size:
    11.5px;
}


.needs-summary-card strong {
  display: block;

  margin-top:
    4px;

  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size:
    25px;
}


.needs-summary-card small {
  display: block;

  margin-top:
    4px;

  color:
    #8c98a8;

  font-size:
    10px;
}


/* =====================================================
   GRID OPERATIVO
===================================================== */

.needs-operations-grid {
  display: grid;

  grid-template-columns:
    minmax(0,1.7fr)
    minmax(300px,.8fr);

  gap: 18px;
}


.needs-operations-left,
.needs-operations-right {
  display: flex;

  flex-direction: column;

  gap: 18px;
}


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

.needs-panel {
  overflow: hidden;

  border:
    1px solid
    #dfe8f2;

  border-radius:
    19px;

  background:
    white;

  box-shadow:
    0 12px 32px
    rgba(19,72,117,.04);
}


.needs-panel-heading {
  padding:
    18px
    19px
    6px;
}


.needs-panel-between {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 15px;
}


.needs-panel-heading h2 {
  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size:
    15px;
}


.needs-panel-heading p {
  margin-top:
    4px;

  color:
    #8390a2;

  font-size:
    11px;
}


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

.needs-filter-grid {
  display: grid;

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

  gap: 10px;

  padding:
    13px
    19px
    8px;
}


.needs-field label {
  display: block;

  margin-bottom:
    5px;

  color:
    #67768a;

  font-size:
    11px;

  font-weight:
    700;
}


.needs-field select {
  width: 100%;
  height: 39px;

  padding:
    0
    10px;

  border:
    1px solid
    #dce5ef;

  border-radius:
    10px;

  outline:
    none;

  color:
    #536278;

  background:
    #f9fbfd;

  font-size:
    11.5px;
}


.needs-field select:focus {
  border-color:
    #acd6fa;

  box-shadow:
    0 0 0 3px
    rgba(22,136,255,.07);
}


.needs-field input[type="text"],
.needs-field input[type="number"] {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  outline: none;
  color: #536278;
  background: #f9fbfd;
  font-size: 11.5px;
  box-sizing: border-box;
}

.needs-field input[type="text"]:focus,
.needs-field input[type="number"]:focus {
  border-color: #acd6fa;
  box-shadow: 0 0 0 3px rgba(22,136,255,.07);
}

.needs-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  outline: none;
  color: #536278;
  background: #f9fbfd;
  font-size: 11.5px;
  box-sizing: border-box;
  resize: vertical;
}

.needs-field textarea:focus {
  border-color: #acd6fa;
  box-shadow: 0 0 0 3px rgba(22,136,255,.07);
}


.needs-filter-actions {
  display: flex;

  gap: 8px;

  padding:
    5px
    19px
    18px;
}


.needs-apply-btn,
.needs-clear-btn {
  min-height:
    38px;

  display: inline-flex;

  align-items: center;

  gap: 7px;

  padding:
    0
    13px;

  border-radius:
    10px;

  cursor:
    pointer;

  font-size:
    11px;

  font-weight:
    800;
}


.needs-apply-btn {
  color:
    white;

  background:
    #1688ff;
}


.needs-clear-btn {
  color:
    #596b82;

  border:
    1px solid
    #dae4ee;

  background:
    white;
}


/* =====================================================
   TABLA
===================================================== */

.needs-count-btn {
  min-height:
    34px;

  display: inline-flex;

  align-items: center;

  gap: 6px;

  padding:
    0
    10px;

  border:
    1px solid
    #dae4ee;

  border-radius:
    9px;

  color:
    #586a82;

  background:
    #f9fbfd;

  cursor:
    pointer;

  font-size:
    11px;

  font-weight:
    700;
}


.needs-table-wrap {
  width: 100%;

  overflow-x: auto;

  padding:
    10px
    18px
    18px;
}


.needs-table {
  width: 100%;

  min-width:
    760px;

  border-collapse:
    collapse;
}


.needs-table th {
  padding:
    12px
    10px;

  border-bottom:
    1px solid
    #dfe7ef;

  color:
    #758397;

  background:
    #f8fbfe;

  text-align:
    left;

  font-size:
    11px;
}


.needs-table td {
  padding:
    13px
    10px;

  border-bottom:
    1px solid
    #edf1f5;

  color:
    #59687c;

  font-size:
    11px;
}


.needs-table tbody tr:hover {
  background:
    #f9fcff;
}


.needs-table td strong {
  color:
    #061326;
}


.need-pill {
  display: inline-flex;

  align-items: center;

  padding:
    5px
    8px;

  border-radius:
    999px;

  font-size:
    10px;

  font-weight:
    800;
}


.need-pill.high {
  color:
    #d35460;

  background:
    #ffedf0;
}


.need-pill.medium {
  color:
    #c38110;

  background:
    #fff4de;
}


.need-pill.low {
  color:
    #168c63;

  background:
    #e8f8f0;
}


.need-pill.pending {
  color:
    #cf5360;

  background:
    #fff1f3;
}


.need-pill.review {
  color:
    #bd7b12;

  background:
    #fff6e6;
}


.need-pill.attended {
  color:
    #168c63;

  background:
    #eaf8f1;
}


/* =====================================================
   ALERTAS
===================================================== */

.needs-alert-list {
  display: flex;

  flex-direction: column;

  gap: 9px;

  padding:
    12px
    15px
    17px;
}


.needs-alert {
  display: flex;

  align-items: flex-start;

  gap: 10px;

  padding:
    12px;

  border-radius:
    13px;
}


.needs-alert.red {
  background:
    #fff3f5;
}


.needs-alert.orange {
  background:
    #fff7e9;
}


.needs-alert.blue {
  background:
    #eef6ff;
}


.needs-alert-icon {
  width: 36px;
  height: 36px;

  flex:
    0
    0
    auto;

  display: flex;

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

  border-radius:
    10px;

  background:
    rgba(255,255,255,.82);

  color:
    #285b8d;

  font-size:
    13px;
}


.needs-alert strong {
  display: block;

  color:
    #061326;

  font-size:
    11.5px;
}


.needs-alert p {
  margin-top:
    4px;

  color:
    #748297;

  font-size:
    11px;

  line-height:
    1.5;
}


/* =====================================================
   CATEGORÍAS
===================================================== */

.needs-category-list {
  padding:
    13px
    17px
    18px;
}


.needs-category {
  margin-bottom:
    13px;
}


.needs-category > div:first-child {
  display: flex;

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

  gap: 10px;

  margin-bottom:
    6px;

  color:
    #596a80;

  font-size:
    11px;
}


.needs-category strong {
  color:
    #061326;
}


.needs-progress {
  height:
    5px;

  overflow:
    hidden;

  border-radius:
    999px;

  background:
    #ebf0f5;
}


.needs-progress span {
  display: block;

  height:
    100%;

  border-radius:
    inherit;

  background:
    linear-gradient(
      90deg,
      #1688ff,
      #3ebed9
    );
}


/* =====================================================
   TAREAS
===================================================== */

.needs-task-list {
  display: flex;

  flex-direction: column;

  gap: 10px;

  padding:
    13px
    17px
    18px;
}


.needs-task {
  display: flex;

  align-items: flex-start;

  gap: 9px;

  color:
    #596a80;

  font-size:
    11px;

  line-height:
    1.45;

  cursor:
    pointer;
}


.needs-task input {
  margin-top:
    1px;

  accent-color:
    #1688ff;
}


/* =====================================================
   ACTIVIDAD
===================================================== */

.needs-activity-list {
  display: flex;

  flex-direction: column;

  gap: 12px;

  padding:
    13px
    17px
    18px;
}


.needs-activity {
  display: flex;

  align-items: flex-start;

  gap: 9px;
}


.activity-point {
  width: 8px;
  height: 8px;

  flex:
    0
    0
    auto;

  margin-top:
    4px;

  border-radius:
    50%;
}


.activity-point.blue {
  background:
    #1688ff;
}


.activity-point.green {
  background:
    #18a66b;
}


.activity-point.orange {
  background:
    #e59a1d;
}


.needs-activity strong {
  display: block;

  color:
    #061326;

  font-size:
    11px;
}


.needs-activity p {
  margin-top:
    3px;

  color:
    #8491a3;

  font-size:
    10.5px;
}


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

@media (max-width: 1150px) {

  .needs-summary-grid {
    grid-template-columns:
      repeat(2,1fr);
  }


  .needs-operations-grid {
    grid-template-columns:
      1fr;
  }


  .needs-filter-grid {
    grid-template-columns:
      repeat(2,1fr);
  }

}


@media (max-width: 700px) {

  .needs-hero {
    align-items:
      flex-start;

    flex-direction:
      column;
  }


  .needs-filter-grid {
    grid-template-columns:
      1fr;
  }

}


@media (max-width: 600px) {

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


  .needs-hero h1 {
    font-size:
      27px;
  }


  .needs-hero {
    padding:
      22px
      18px;
  }


  .needs-filter-actions {
    flex-direction:
      column;
  }


  .needs-apply-btn,
  .needs-clear-btn {
    justify-content:
      center;
  }

}
