/* ==========================================================================
   CONSULTAS BOICAC — Diseño Figma 22889-75310
   ========================================================================== */

/* ── Page wrapper ── */
.boicac-page {
  background: #ffffff;
  padding: 64px 0;
}
.boicac-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Breadcrumb ── */
.boicac-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.boicac-bc__item { font-size: 14px; color: #525252; }
.boicac-bc__item a { color: #525252; text-decoration: none; }
.boicac-bc__item a:hover { color: #b91c1c; }
.boicac-bc__item--current { color: #0a0a0a; font-weight: 500; }
.boicac-bc__sep { color: #a3a3a3; font-size: 12px; }

/* ── Title ── */
.boicac-page__title {
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
  color: #0a0a0a;
  margin: 0;
  letter-spacing: 0;
}

/* ── Filters ── */
.boicac-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.boicac-filters__row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
.boicac-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 305px;
  flex-shrink: 0;
}
.boicac-field--grow { flex: 1 1 0; width: auto; }
.boicac-field--auto { width: auto; flex-shrink: 0; }

.boicac-field__label {
  font-size: 14px;
  font-weight: 500;
  color: #0a0a0a;
  line-height: 1;
  white-space: nowrap;
}
.boicac-field__label--hidden { visibility: hidden; }

/* Select wrapper */
.boicac-select-wrap { position: relative; display: flex; align-items: center; }
.boicac-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Select + Input base */
.boicac-select,
.boicac-input {
  width: 100%;
  height: 36px;
  padding: 0 36px 0 12px;
  font-size: 14px;
  font-weight: 400;
  color: #525252;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  cursor: pointer;
}
.boicac-input { padding: 0 12px; cursor: text; }
.boicac-input::placeholder { color: #525252; }
.boicac-select:focus,
.boicac-input:focus { border-color: #172554; box-shadow: 0 0 0 2px rgba(23,37,84,0.1); }

.boicac-select--sort { width: auto; min-width: 200px; }
.boicac-select--sm   { width: auto; min-width: 60px; padding: 0 28px 0 10px; font-weight: 700; color: #0a0a0a; }

/* Buscar button */
.boicac-btn-search {
  height: 36px;
  padding: 0 16px;
  background: #b91c1c;
  color: #fafafa;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  transition: background 0.15s;
}
.boicac-btn-search:hover { background: #991b1b; }

/* Limpiar filtros */
.boicac-filters__clear { display: flex; justify-content: flex-end; }
.boicac-btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: transparent;
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.boicac-btn-clear:hover { background: #f3f4f6; }

/* ── Toolbar ── */
.boicac-toolbar {
  display: flex;
  justify-content: flex-end;
}
.boicac-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.boicac-btn-listview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: transparent;
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.boicac-btn-listview:hover,
.boicac-btn-listview.active { background: #f3f4f6; }

/* ── Separator ── */
.boicac-sep { border: none; border-top: 1px solid #e5e5e5; margin: 0; }

/* ── GRID ── */
.boicac-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

/* ── CARD — Figma exact ── */
.boicac-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  transition: box-shadow 0.2s;
}
.boicac-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* Badge row */
.boicac-card__badges { display: flex; align-items: center; gap: 8px; }
.boicac-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #172554;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: #fafafa;
  white-space: nowrap;
}
.boicac-badge--sm { font-size: 11px; padding: 3px 6px; }

/* Cover — gray bg with number + slashes */
.boicac-card__cover {
  background: #f3f4f6;
  border-radius: 10px;
  height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 16px 16px 0 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.boicac-card__cover-top { width: 100%; }
.boicac-card__cover-number {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #0a0a0a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boicac-card__cover-slashes { flex-shrink: 0; }
.boicac-card__cover-slashes svg { display: block; }

/* Title */
.boicac-card__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  color: #0a0a0a;
  margin: 0;
}
.boicac-card__title a { color: inherit; text-decoration: none; }
.boicac-card__title a:hover { color: #b91c1c; }

/* Description */
.boicac-card__desc {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: #525252;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Actions row */
.boicac-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.boicac-card__btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px;
  background: #ffffff;
  color: #0a0a0a;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  transition: background 0.15s;
}
.boicac-card__btn-pdf:hover { background: #f9fafb; color: #0a0a0a; text-decoration: none; }
.boicac-card__btn-pdf .boicac-card__btn-text { /* text label */ }

.boicac-card__btn-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 8px;
  background: transparent;
  color: #b91c1c;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.boicac-card__btn-more:hover { background: #fff1f2; color: #b91c1c; text-decoration: none; }

/* ── LIST MODE ── */
.boicac-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.boicac-table__header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 16px;
}
.boicac-table__row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 16px;
  background: #ffffff;
  min-height: 52px;
}
.boicac-table__row:hover { background: #fafafa; }
.boicac-table__th {
  font-size: 14px;
  font-weight: 500;
  color: #525252;
  height: 40px;
  display: flex;
  align-items: center;
}
.boicac-table__cell {
  font-size: 14px;
  color: #0a0a0a;
  padding: 8px 0;
  display: flex;
  align-items: center;
}
.boicac-table__cell--title, .boicac-table__th--title {
  flex: 1;
  min-width: 0;
  padding-right: 16px;
}
.boicac-table__cell--title a {
  font-weight: 500;
  color: #0a0a0a;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boicac-table__cell--title a:hover { color: #b91c1c; }
.boicac-table__cell--number, .boicac-table__th--number {
  width: 367px;
  flex-shrink: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boicac-table__cell--date, .boicac-table__th--date {
  width: 116px;
  flex-shrink: 0;
  color: #0a0a0a;
}
.boicac-table__cell--actions, .boicac-table__th--actions {
  width: 194px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.boicac-table__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #ffffff;
  color: #0a0a0a;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  transition: background 0.15s;
}
.boicac-table__btn:hover { background: #f3f4f6; color: #0a0a0a; }

@media (max-width: 1024px) {
  .boicac-table__cell--number, .boicac-table__th--number { width: 180px; }
  .boicac-table__cell--date, .boicac-table__th--date { width: 90px; }
  .boicac-table__cell--actions, .boicac-table__th--actions { width: 120px; }
}
@media (max-width: 768px) {
  .boicac-table__cell--number, .boicac-table__th--number,
  .boicac-table__cell--date, .boicac-table__th--date { display: none; }
  .boicac-table__cell--actions, .boicac-table__th--actions { width: auto; }
}

/* ── Empty ── */
.boicac-empty {
  padding: 64px 0;
  text-align: center;
  color: #525252;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.boicac-empty p { margin: 0; }

/* ── Pagination ── */
.boicac-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}
.boicac-pagination__left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.boicac-perpage-label { font-size: 14px; font-weight: 500; color: #0a0a0a; }

.boicac-pager { display: flex; align-items: center; gap: 4px; }
.boicac-pager__nums { display: flex; align-items: center; gap: 2px; }
.boicac-pager__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: #0a0a0a;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.boicac-pager__num:hover { background: #f3f4f6; }
.boicac-pager__num--active { background: #f3f4f6; color: #b91c1c; pointer-events: none; }
.boicac-pager__dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 14px;
  color: #0a0a0a;
}
.boicac-pager__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: #0a0a0a;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.boicac-pager__btn--next { background: #e2e8f0; }
.boicac-pager__btn:hover:not(:disabled) { background: #f3f4f6; }
.boicac-pager__btn--next:hover:not(:disabled) { background: #cbd5e1; }
.boicac-pager__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .boicac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boicac-filters__row { flex-wrap: wrap; }
  .boicac-field { width: 220px; }
}
@media (max-width: 768px) {
  .boicac-page { padding: 32px 0; }
  .boicac-container { padding: 0 16px; gap: 16px; }
  .boicac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .boicac-field, .boicac-field--grow { width: 100%; }
  .boicac-field--auto { width: 100%; }
  .boicac-btn-search { width: 100%; }
  .boicac-page__title { font-size: 28px; line-height: 34px; }
  .boicac-pagination { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   DATE RANGE PICKER — Dual-month calendar
   ========================================================================== */
.boicac-daterange-wrap {
  position: relative;
}

.boicac-daterange-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
  color: #525252;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.boicac-daterange-trigger:focus {
  border-color: #172554;
  box-shadow: 0 0 0 2px rgba(23,37,84,0.1);
  outline: none;
}
.boicac-daterange-trigger__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.boicac-daterange-trigger__arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.boicac-daterange-wrap.is-open .boicac-daterange-trigger__arrow {
  transform: rotate(180deg);
}

/* Popup container */
.boicac-calendar-popup {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  padding: 20px;
  min-width: 540px;
}
.boicac-calendar-popup__inner {
  display: flex;
  gap: 24px;
}

/* Navigation arrows */
.boicac-calendar-nav {
  position: absolute;
  top: 20px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #0a0a0a;
  transition: background 0.15s;
}
.boicac-calendar-nav:hover { background: #f3f4f6; }
.boicac-calendar-nav--prev { left: 20px; }
.boicac-calendar-nav--next { right: 20px; }

/* Individual calendar */
.boicac-calendar {
  width: 245px;
  flex-shrink: 0;
}
.boicac-calendar__header {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0a;
  margin-bottom: 12px;
  line-height: 28px;
}
.boicac-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin-bottom: 4px;
}
.boicac-calendar__weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #a3a3a3;
  padding: 4px 0;
}
.boicac-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.boicac-calendar__day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  font-size: 14px;
  font-weight: 400;
  color: #0a0a0a;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.boicac-calendar__day:hover:not(.is-disabled):not(.is-empty) {
  background: #f3f4f6;
}
.boicac-calendar__day.is-empty {
  visibility: hidden;
  cursor: default;
}
.boicac-calendar__day.is-other-month {
  color: #cbd5e1;
}
.boicac-calendar__day.is-today {
  background: #b91c1c;
  color: #ffffff;
  font-weight: 600;
  border-radius: 8px;
}
.boicac-calendar__day.is-selected {
  background: #b91c1c;
  color: #ffffff;
  font-weight: 600;
  border-radius: 8px;
}
.boicac-calendar__day.is-in-range {
  background: #fee2e2;
  color: #0a0a0a;
  border-radius: 0;
}
.boicac-calendar__day.is-range-start {
  border-radius: 8px 0 0 8px;
}
.boicac-calendar__day.is-range-end {
  border-radius: 0 8px 8px 0;
}
.boicac-calendar__day.is-disabled {
  color: #d4d4d4;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .boicac-calendar-popup {
    min-width: auto;
    width: calc(100vw - 32px);
    max-width: 540px;
  }
  .boicac-calendar-popup__inner {
    flex-direction: column;
    gap: 16px;
  }
  .boicac-calendar { width: 100%; }
  .boicac-calendar__day { width: auto; }
}
