@charset "UTF-8";
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0 auto;
  padding: 20px;
  background: #f5f5f5;
}

a {
  color: #007bff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

mark {
  background: #fff3cd;
  padding: 0 2px;
  border-radius: 2px;
}

.page-hospitals {
  max-width: 1400px;
}

.page-hospital,
.page-collaborator {
  max-width: 1200px;
}

.back-link {
  color: #007bff;
  text-decoration: none;
  font-size: 14px;
}
.back-link:hover {
  text-decoration: underline;
}

.search-container {
  margin-bottom: 20px;
  position: relative;
  z-index: 1001;
}

#search {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
}
#search:focus {
  border-color: #007bff;
}

.search-info {
  margin-top: 8px;
  color: #666;
  font-size: 14px;
}

.logo-group {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-nav {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  align-self: flex-start;
}

.page-nav-icon {
  display: flex;
  align-items: center;
  opacity: 0.3;
  transition: opacity 0.15s, transform 0.15s;
}
.page-nav-icon img {
  height: 16px;
  width: auto;
}
.page-nav-icon:hover {
  opacity: 0.7;
  transform: scale(1.25);
}
.page-nav-icon.active {
  opacity: 1;
}

.page-hospitals #search {
  font-family: monospace;
}
.page-hospitals .page-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 10px;
}
@media (max-width: 700px) {
  .page-hospitals .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
.page-hospitals .logo-link {
  flex-shrink: 0;
}
.page-hospitals .mas-logo {
  height: 40px;
  width: auto;
}
.page-hospitals .search-section {
  flex: 1;
  max-width: 500px;
}
.page-hospitals .search-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}
.page-hospitals .search-label #hospitals-count {
  font-weight: 600;
  color: #c41e3a;
}
.page-hospitals .search-container {
  margin: 0;
}

.page-hospital .search-container,
.page-collaborator .search-container {
  margin: 16px 0 24px 0;
  max-width: 800px;
  position: relative;
}
.page-hospital #search,
.page-collaborator #search {
  padding: 10px 14px 10px 36px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.page-hospital #search:focus,
.page-collaborator #search:focus {
  cursor: text;
}
.page-hospital .search-icon,
.page-collaborator .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.5;
  pointer-events: none;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #007bff;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.autocomplete-dropdown.visible {
  display: block;
}

.autocomplete-item {
  padding: 10px 16px;
  cursor: pointer;
}
.autocomplete-item:hover, .autocomplete-item.selected {
  background: #e7f1ff;
}
.autocomplete-item .match {
  background: #fff3cd;
  font-weight: bold;
}
.autocomplete-item .count {
  float: right;
  color: #888;
  font-size: 12px;
}

.page-hospitals .autocomplete-item {
  font-family: monospace;
}

.page-hospital .autocomplete-dropdown,
.page-collaborator .autocomplete-dropdown {
  max-height: 400px;
}
.page-hospital .autocomplete-item,
.page-collaborator .autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.page-hospital .autocomplete-item:last-child,
.page-collaborator .autocomplete-item:last-child {
  border-bottom: none;
}
.page-hospital .autocomplete-item img,
.page-collaborator .autocomplete-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.page-hospital .autocomplete-item .ac-hcode-label,
.page-collaborator .autocomplete-item .ac-hcode-label {
  width: 28px;
  height: 28px;
  font-size: 9px;
  border-radius: 4px;
  flex-shrink: 0;
}
.page-hospital .autocomplete-item .names,
.page-hospital .autocomplete-item .info,
.page-collaborator .autocomplete-item .names,
.page-collaborator .autocomplete-item .info {
  flex: 1;
  min-width: 0;
}
.page-hospital .autocomplete-item .simple-name,
.page-hospital .autocomplete-item .name,
.page-collaborator .autocomplete-item .simple-name,
.page-collaborator .autocomplete-item .name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-hospital .autocomplete-item .hospital-name,
.page-hospital .autocomplete-item .company,
.page-collaborator .autocomplete-item .hospital-name,
.page-collaborator .autocomplete-item .company {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-hospital .autocomplete-item .hcode-label,
.page-hospital .autocomplete-item .pid-label,
.page-collaborator .autocomplete-item .hcode-label,
.page-collaborator .autocomplete-item .pid-label {
  color: #888;
  font-size: 11px;
  font-family: monospace;
  flex-shrink: 0;
}

.page-collaborator .autocomplete-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.page-collaborator .autocomplete-item img.org-logo {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: contain;
  margin-left: 8px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.page-collaborator .autocomplete-item:hover img.org-logo {
  opacity: 1;
}

.ac-state-item {
  border-left: 3px solid #6b9e4f;
  background: rgba(107, 158, 79, 0.04);
}
.ac-state-item .ac-state-escudo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}
.ac-state-item .simple-name {
  color: #333;
}
.ac-state-item:hover, .ac-state-item.selected {
  background: rgba(107, 158, 79, 0.1);
}

.ac-separator {
  height: 1px;
  background: #e0e0e0;
  margin: 4px 16px;
}

.page-hospital .profile-card, .page-collaborator .profile-details {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page-hospital .profile-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0;
}
@media (max-width: 900px) {
  .page-hospital .profile-card {
    grid-template-columns: 1fr;
  }
}

.page-collaborator .profile-card {
  display: flex;
}
@media (max-width: 800px) {
  .page-collaborator .profile-card {
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .page-collaborator .profile-card {
    flex-direction: column;
    position: relative;
  }
}

.profile-photo-section {
  width: 400px;
  flex-shrink: 0;
  background: transparent;
}
@media (max-width: 800px) {
  .profile-photo-section {
    width: 100%;
    max-height: 400px;
  }
}
@media (max-width: 600px) {
  .profile-photo-section {
    width: 100%;
    height: 350px;
    max-height: none;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .profile-photo-section:has(.profile-photo.fallback) {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
}

.profile-photo {
  width: 100%;
  border-radius: 10px;
  margin: 0;
  object-fit: cover;
  display: block;
}
.profile-photo.fallback {
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 50px auto 0;
}
@media (max-width: 600px) {
  .profile-photo {
    margin: 0;
    margin-top: -40px;
    border-radius: 0;
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center 30%;
  }
  .profile-photo.fallback {
    width: 32px;
    height: 32px;
    max-width: none;
    border-radius: 10%;
    position: absolute;
    top: auto;
    bottom: -48px;
    left: 16px;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 10;
  }
}

.profile-details {
  flex: 1;
  padding: 24px;
  margin-left: 20px;
}
@media (max-width: 600px) {
  .profile-details {
    padding: 16px;
    margin-left: 0;
  }
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    gap: 8px;
  }
}

.profile-name {
  flex: 1;
}
@media (max-width: 600px) {
  .profile-name {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    text-align: center;
    gap: 0 6px;
    padding-bottom: 1em;
  }
}

@media (max-width: 600px) {
  .profile-card:has(.profile-photo.fallback) .profile-name {
    padding-left: 48px;
  }
}

.profile-title {
  font-size: 12px;
  color: #666;
  display: inline-block;
  width: 100px;
  text-align: right;
  margin-right: 6px;
}
@media (max-width: 600px) {
  .profile-title {
    font-size: 20px;
    width: auto;
  }
}

.profile-firstname {
  font-size: 32px;
  font-weight: 600;
  color: #333;
  display: inline;
}
@media (max-width: 600px) {
  .profile-firstname {
    font-size: 30px;
  }
}

.profile-lastname {
  font-size: 32px;
  font-weight: 400;
  color: #333;
  display: inline;
  margin-left: 8px;
}
@media (max-width: 600px) {
  .profile-lastname {
    font-size: 30px;
    margin-left: 6px;
  }
}

.profile-pid {
  text-align: right;
}
.profile-pid .label {
  font-size: 11px;
  color: #999;
  text-align: center;
}
.profile-pid .value {
  font-size: 20px;
  font-weight: 300;
  color: #888;
}

.profile-hcode {
  text-align: right;
}
.profile-hcode .label {
  font-size: 11px;
  color: #999;
  text-align: center;
}
.profile-hcode .value {
  font-size: 36px;
  font-weight: 300;
  color: #333;
}

@media (max-width: 600px) {
  .page-collaborator .profile-pid {
    display: none;
  }
}

.profile-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.section {
  margin-top: 20px;
  border-top: 2px solid #c41e3a;
}
@media (max-width: 600px) {
  .section {
    padding-bottom: 2em;
  }
}

.section-header {
  display: flex;
  justify-content: flex-end;
  margin-top: -1.5em;
  margin-bottom: 1em;
}
@media (max-width: 600px) {
  .section-header {
    justify-content: center;
  }
}

.section-title {
  background: #c41e3a;
  color: white;
  padding: 4px 12px;
  border-radius: 4px 4px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.section-content {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.field-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 120px;
  flex-shrink: 0;
}

.field-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.field-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.field-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.field-value {
  font-size: 14px;
  color: #333;
}
.field-value a {
  color: #007bff;
  text-decoration: none;
}
.field-value a:hover {
  text-decoration: underline;
}
.field-value a.simple-pill, .field-value a.estado-pill, .field-value a.region-pill {
  color: #333;
}
.field-value a.simple-pill:hover, .field-value a.estado-pill:hover, .field-value a.region-pill:hover {
  text-decoration: none;
}
.field-value a.region-pill.region-colored {
  color: var(--region-text);
}
.field-value.large {
  font-size: 16px;
  font-weight: 500;
}

.email-row {
  flex-wrap: wrap;
}

.email-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.email-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: all 0.15s ease;
}
.email-pill:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.email-pill .ep-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
  margin-right: 6px;
}
.email-pill .ep-user {
  font-weight: 600;
}
.email-pill .ep-domain {
  opacity: 0.5;
}

.simple-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: all 0.15s ease;
}
.simple-pill:hover {
  border-color: #999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
  font-weight: 600;
}

a.simple-pill {
  color: #333;
}
a.simple-pill:hover {
  color: #333;
}

.estado-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: all 0.15s ease;
}
.estado-pill:hover {
  border-color: #999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
  font-weight: 600;
  color: #333;
}
.estado-pill .estado-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
  margin-right: 6px;
}

.region-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: all 0.15s ease;
}
.region-pill.region-colored {
  background: var(--region-bg);
  border-color: color-mix(in srgb, var(--region-text) 30%, transparent);
  color: var(--region-text);
  font-weight: 600;
}
.region-pill.region-colored .rp-head {
  background: color-mix(in srgb, var(--region-bg) 50%, var(--region-text));
  border-right: 1px solid color-mix(in srgb, var(--region-text) 30%, transparent);
}
.region-pill:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.region-pill .rp-head {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  margin: -5px 0 -5px -10px;
  border-right: 1px solid #ddd;
  border-radius: 7px 0 0 7px;
  transition: background 0.15s;
}
.region-pill .rp-label {
  padding-left: 8px;
}
.region-pill .region-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}
.region-pill {
  margin-left: 5px;
}

.sector-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #000;
  font-size: 13px;
  transition: all 0.15s ease;
}
.sector-pill.sector-colored {
  background: var(--sector-bg);
  border-color: color-mix(in srgb, var(--sector-text) 30%, transparent);
  color: var(--sector-text);
  font-weight: 600;
}
.sector-pill.sector-colored .sp-head {
  border-right: 1px solid color-mix(in srgb, var(--sector-text) 30%, transparent);
}
.sector-pill:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.sector-pill .sp-head {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  margin: -5px 0 -5px -10px;
  border-right: 1px solid #ddd;
  border-radius: 7px 0 0 7px;
  transition: background 0.15s;
}
.sector-pill .sp-label {
  padding-left: 8px;
}
.sector-pill .sector-icon {
  height: 18px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.sector-pill .sector-acronym {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #666;
  white-space: nowrap;
}
.sector-pill {
  margin-left: 5px;
}

a.sector-pill {
  color: #000;
}
a.sector-pill:hover {
  color: #000;
}
a.sector-pill.sector-colored {
  color: var(--sector-text);
}
a.sector-pill.sector-colored:hover {
  color: var(--sector-text);
}

.collab-row {
  margin-bottom: 12px;
}

.collab-content {
  width: 100%;
}

.workshops-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.workshops-list.two-col {
  columns: 2;
  column-gap: 12px;
  display: block;
}
.workshops-list.two-col .workshop-pill {
  display: inline-flex;
  margin-bottom: 4px;
  break-inside: avoid;
}
@media (max-width: 600px) {
  .workshops-list.two-col {
    columns: 1;
  }
}

.workshop-pill {
  display: inline-flex;
  align-items: center;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 10px;
  text-decoration: none;
  color: #333;
  overflow: hidden;
  transition: all 0.15s ease;
}
.workshop-pill:hover {
  border-color: #999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.workshop-pill:hover .wp-head {
  background: #555;
  color: white;
}
.workshop-pill .wp-head {
  font-weight: 600;
  padding: 4px 8px;
  background: #eee;
  border-right: 1px solid #ddd;
  transition: background 0.15s, color 0.15s;
}
.workshop-pill .wp-date {
  padding: 4px 7px;
}
.workshop-pill .wp-city {
  padding: 4px 8px 4px 0;
  opacity: 0.5;
  border-left: 1px solid #ddd;
  padding-left: 7px;
}
.workshop-pill.ws-colored {
  border-color: var(--ws-color);
  color: color-mix(in srgb, var(--ws-color) 65%, black);
}
.workshop-pill.ws-colored .wp-head {
  background: color-mix(in srgb, var(--ws-color) 15%, white);
}
.workshop-pill.ws-colored:hover {
  border-color: color-mix(in srgb, var(--ws-color) 80%, black);
}
.workshop-pill.ws-colored:hover .wp-head {
  background: var(--ws-color);
  color: white;
}

.projects-row,
.leaderships-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--proj-color) 6%, #fafafa);
  border: 1px solid color-mix(in srgb, var(--proj-color) 35%, #ddd);
  border-radius: 8px;
  text-decoration: none;
  color: color-mix(in srgb, var(--proj-color) 65%, black);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.project-pill:hover {
  border-color: var(--proj-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
  color: color-mix(in srgb, var(--proj-color) 65%, black);
}
.project-pill .pp-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-right: 6px;
  background-color: color-mix(in srgb, var(--proj-color) 65%, black);
  -webkit-mask: center/contain no-repeat;
  mask: center/contain no-repeat;
}

.leadership-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  color: #333;
  overflow: hidden;
  transition: all 0.15s ease;
}
.leadership-pill .lp-head {
  padding: 4px 8px;
  background: #555;
  color: white;
  font-weight: 600;
  white-space: nowrap;
}
.leadership-pill .lp-org {
  padding: 4px 8px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-left: 1px solid #ddd;
  white-space: nowrap;
}
.leadership-pill .lp-role {
  padding: 4px 8px;
  border-left: 1px solid #ddd;
  opacity: 0.7;
}
.leadership-pill:hover {
  border-color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
  color: #333;
}
.leadership-pill.ls-colored {
  border-color: var(--ls-color);
  color: color-mix(in srgb, var(--ls-color) 65%, black);
}
.leadership-pill.ls-colored .lp-head {
  background: color-mix(in srgb, var(--ls-color) 15%, white);
  color: color-mix(in srgb, var(--ls-color) 70%, black);
}
.leadership-pill.ls-colored .lp-org {
  border-left-color: color-mix(in srgb, var(--ls-color) 30%, white);
}
.leadership-pill.ls-colored .lp-role {
  border-left-color: color-mix(in srgb, var(--ls-color) 30%, white);
}
.leadership-pill.ls-colored:hover {
  border-color: color-mix(in srgb, var(--ls-color) 80%, black);
}
.leadership-pill.ls-colored:hover .lp-head {
  background: var(--ls-color);
  color: white;
}

.whatsapp-btn,
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: color-mix(in srgb, #2e7d32 5%, #fafafa);
  color: #2e7d32;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #c8e6c9;
  transition: all 0.15s ease;
}
.whatsapp-btn:hover,
.whatsapp-link:hover {
  border-color: #2e7d32;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.whatsapp-btn img,
.whatsapp-link img {
  width: 16px;
  height: 16px;
}

.whatsapp-link {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
}
.whatsapp-link img {
  width: 14px;
  height: 14px;
}

.not-found {
  background: white;
  border-radius: 8px;
  text-align: center;
  padding: 60px 20px;
  color: #666;
}
.not-found h2 {
  margin-bottom: 10px;
}

.hcode-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: -0.3px;
  line-height: 1;
}

.hosp-logo.hcode-label {
  font-size: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.hospital-logo.hcode-label {
  font-size: 10px;
}

.hosp-map-container .map-hospital-logo.hcode-label {
  font-size: 9px;
}

.hosp-map-container .map-hospital-logo.hosp-map-current.hcode-label {
  font-size: 18px;
}

.hosp-map-container .map-hospital-logo.hosp-map-other.hcode-label {
  font-size: 9px;
}

.map-hospital-logo.hcode-label {
  font-size: 12px;
}
.map-hospital-logo.hcode-label.zoomed {
  font-size: 19px;
}

.hospital-item .hospital-logo.hcode-label {
  font-size: 11px;
}

.hospital-mini-logo.hcode-label {
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.others-hospital-logo.hcode-label {
  font-size: 10px;
}

.page-collaborator .filter-inline-logo.hcode-label {
  font-size: 7px;
}

.page-collaborator .filter-pill-logo.hcode-label {
  font-size: 6px;
}

.page-collaborator .filter-hospital-logo.hcode-label {
  font-size: 7px;
}

.browse-list .browse-item .org-logo.hcode-label {
  font-size: 9px;
}

.browse-list .browse-group .group-logo.hcode-label {
  font-size: 8px;
}

.page-hospital.browse-mode .page-header {
  margin-bottom: 10px;
}
.page-hospital .page-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: 1px solid #eee;
}
@media (max-width: 700px) {
  .page-hospital .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
.page-hospital .logo-group {
  flex-direction: row;
  gap: 16px;
  align-items: center;
  margin-right: 8px;
  padding-bottom: 10px;
}
.page-hospital .page-header:has(.hosp-filter-toggle-arrow.open) .logo-group {
  flex-direction: column;
  align-items: flex-start;
}
.page-hospital .page-header:has(.hosp-filter-toggle-arrow.open) .search-container {
  flex: 0 0 256px;
}
.page-hospital .logo-link {
  flex-shrink: 0;
  line-height: 0;
}
.page-hospital .page-nav {
  margin-top: 0;
  align-self: center;
  padding-right: 14px;
  border-right: 1px solid #ddd;
}
.page-hospital .page-nav-icon img {
  height: 28px;
}
.page-hospital .mas-logo {
  height: 40px;
  width: auto;
}
.page-hospital .search-section {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
}
.page-hospital .hosp-filter-bar {
  flex: 7;
  min-width: 0;
  order: 1;
  margin-right: 10px;
  transition: flex 0.2s ease;
}
.page-hospital .search-container {
  flex: 0 0 100px;
  min-width: 0;
  margin: 0 0 8px 0;
  order: 2;
  transition: flex 0.2s ease;
}
.page-hospital .search-container #search {
  border-width: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.page-hospital .search-container #search:hover {
  border-color: #007bff;
  color: #007bff;
}
.page-hospital .search-container #search:hover::placeholder {
  color: #007bff;
}
.page-hospital .search-container .autocomplete-dropdown {
  border-width: 1px;
  border-color: #007bff;
}
.page-hospital:has(.search-container:focus-within) .search-container {
  flex: 5;
}
.page-hospital:has(.search-container:focus-within) .hosp-filter-bar {
  flex: 7;
}
.page-hospital:has(.search-container:focus-within) .hosp-compare-btn {
  display: none;
}
.page-hospital:has(.autocomplete-dropdown.visible) .search-container {
  flex: 5;
}
.page-hospital .hosp-filter-active-pills {
  order: 3;
  flex-basis: 100%;
}
.page-hospital .hosp-filter-palette-wrapper {
  order: 4;
  flex-basis: 100%;
}

.delegate-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.delegate-block > a {
  flex-shrink: 0;
}

.delegate-photo {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.delegate-info .delegate-title {
  font-size: 13px;
  color: #888;
  margin-bottom: 2px;
}
.delegate-info .delegate-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}
.delegate-info .delegate-name a {
  color: #333;
  text-decoration: none;
}
.delegate-info .delegate-name a:hover {
  color: #007bff;
  text-decoration: underline;
}
.delegate-info .delegate-contact {
  font-size: 13px;
  color: #666;
}
.delegate-info .delegate-contact a {
  color: #007bff;
}

.hosp-profile-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 16px;
}

.hosp-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.hosp-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

.hosp-header-text {
  flex: 1;
  min-width: 0;
}

.hosp-name {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

.hosp-header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.hosp-tag-estado .hosp-tag-value,
.hosp-tag-region .hosp-tag-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hosp-tag-estado .estado-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 2px;
}

.hosp-tag-region-head {
  display: flex;
  align-items: center;
  padding: 3px 5px;
  border-right: 1px solid #ddd;
}
.hosp-tag-region-head .region-icon-sm {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.hosp-tag-region-colored {
  border-color: color-mix(in srgb, var(--region-text) 30%, transparent);
}
.hosp-tag-region-colored .hosp-tag-region-head {
  background: color-mix(in srgb, var(--region-bg) 50%, var(--region-text));
  border-color: color-mix(in srgb, var(--region-text) 30%, transparent);
}
.hosp-tag-region-colored .hosp-tag-value {
  background: var(--region-bg);
  color: var(--region-text);
  font-weight: 600;
}

.hosp-nombre-previo {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
  font-style: italic;
}

.hosp-tags-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin: 6px 0;
}

.hosp-col-right .hosp-tags-inline {
  align-items: flex-start;
}

.hosp-tag {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  overflow: hidden;
}
.hosp-tag .hosp-tag-label {
  display: flex;
  align-items: center;
  padding: 0 7px;
  background: #f5f5f5;
  color: #666;
  font-size: 10px;
  border-right: 1px solid #ddd;
}
.hosp-tag .hosp-tag-value {
  display: flex;
  align-items: center;
  padding: 1px 8px;
  font-weight: 500;
  color: #333;
}
.hosp-tag.hosp-tag-accent {
  border-color: color-mix(in srgb, #007bff 40%, #ddd);
}
.hosp-tag.hosp-tag-accent .hosp-tag-label {
  background: color-mix(in srgb, #007bff 8%, #f5f5f5);
  color: #007bff;
  border-color: color-mix(in srgb, #007bff 40%, #ddd);
}
.hosp-tag.hosp-tag-accent .hosp-tag-value {
  color: #007bff;
  font-weight: 600;
}
.hosp-tag .mas-icon {
  width: 14px;
  height: 14px;
}
.hosp-tag.hosp-tag-mas .hosp-tag-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.hosp-tag.hosp-tag-status {
  border-color: var(--status-bg);
}
.hosp-tag.hosp-tag-status .hosp-tag-label {
  gap: 3px;
}
.hosp-tag.hosp-tag-status .hosp-tag-value {
  background: var(--status-bg);
  color: var(--status-text);
}
.hosp-tag.hosp-tag-sector {
  border-color: color-mix(in srgb, var(--sector-text) 30%, transparent);
}
.hosp-tag.hosp-tag-sector .hosp-tag-value {
  background: var(--sector-bg);
  color: var(--sector-text);
  font-weight: 600;
  gap: 4px;
}

.hosp-profile-grid {
  display: grid;
  grid-template-columns: 65% 1fr;
  gap: 24px;
  border-top: 1px solid #eee;
  padding-top: 14px;
}
@media (max-width: 700px) {
  .hosp-profile-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.hosp-profile-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hosp-col-right {
  text-align: left;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
}

.hosp-field .hosp-field-label {
  font-size: 13px;
  color: #666;
}
.hosp-field .hosp-field-value {
  font-size: 15px;
  color: #333;
}
.hosp-field .hosp-field-value.hosp-nickname {
  font-size: 20px;
  font-weight: 600;
}
.hosp-field .hosp-field-value.hosp-hcode {
  font-size: 15px;
  font-weight: 500;
}
.hosp-field .hosp-field-value.hosp-year {
  font-size: 24px;
  font-weight: 600;
}

.hosp-field-right .hosp-field-label {
  text-align: right;
}

.hosp-uni-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: baseline;
  gap: 6px;
  cursor: pointer;
}
.hosp-uni-row .hosp-field-label {
  flex-shrink: 0;
}
.hosp-uni-row .hosp-uni-value {
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hosp-uni-row.expanded .hosp-uni-value {
  white-space: normal;
}

.hosp-website-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  margin-bottom: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.hosp-website-pill .ws-pill-label {
  padding: 0 7px;
  background: #f5f5f5;
  color: #666;
  font-size: 10px;
  border-right: 1px solid #ddd;
  white-space: nowrap;
  display: flex;
  align-items: center;
  align-self: stretch;
}
.hosp-website-pill .ws-pill-content {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hosp-website-pill .ws-pill-favicon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-right: 4px;
}
.hosp-website-pill .ws-pill-domain {
  color: #333;
  font-weight: 600;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hosp-website-pill .ws-pill-tld {
  color: #666;
  font-weight: 400;
}
.hosp-website-pill:hover {
  border-color: #007bff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.delegate-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.delegate-mini-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.delegate-mini-card.no-link {
  cursor: default;
}
.delegate-mini-card.no-link:hover {
  border-color: #ddd;
  box-shadow: none;
  transform: none;
}

.delegate-mini-photo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.delegate-mini-details {
  flex: 1;
  min-width: 0;
}

.delegate-mini-label {
  font-size: 10px;
  color: #666;
}

.delegate-mini-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.delegate-email-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: all 0.15s ease;
}
.delegate-email-pill:hover {
  border-color: #007bff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.delegate-email-pill .ep-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
  margin-right: 4px;
}
.delegate-email-pill .ep-user {
  font-weight: 600;
}
.delegate-email-pill .ep-domain {
  opacity: 0.5;
}

.delegate-mini-phone {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

.leader-mini-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.leader-mini-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.leader-mini-card.no-link {
  cursor: default;
}
.leader-mini-card.no-link:hover {
  border-color: #eee;
  box-shadow: none;
  transform: none;
}

.leader-mini-photo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.leader-mini-details {
  flex: 1;
  min-width: 0;
}

.leader-mini-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.leader-mini-name {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.hosp-foundations-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
  max-height: 120px;
  overflow: hidden;
  cursor: default;
  transition: max-height 0.3s ease;
}
.hosp-foundations-pills.expanded {
  max-height: 800px;
}

.hosp-foundation-pill {
  display: inline-block;
  font-size: 10px;
  padding: 3px 7px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #333;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.hosp-links-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
}

.hosp-wikipedia-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.hosp-wikipedia-link:hover {
  opacity: 1;
}

.hosp-wikipedia-favicon {
  width: 16px;
  height: 16px;
}

.hosp-clues-pill .clues-pill-value {
  font-family: monospace;
  font-size: 13px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hosp-alerta {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 16px;
}
.hosp-alerta a {
  color: #92400e;
  text-decoration: underline;
  font-weight: 600;
}
.hosp-alerta a:hover {
  color: #78350f;
}

.hosp-capabilities-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}

.hosp-top-row {
  display: grid;
  grid-template-columns: 60% minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .hosp-top-row {
    grid-template-columns: 1fr;
  }
}
.hosp-top-row .hosp-profile-card {
  margin-bottom: 0;
}

.hosp-geocode-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}
.hosp-geocode-card .hosp-geocode-map {
  width: 100%;
  height: 420px;
  border-radius: 6px;
  margin-top: 10px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}
.hosp-geocode-card .hosp-geocode-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-right: 160px;
}
.hosp-geocode-card .hosp-geocode-source-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #555;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hosp-geocode-card .hosp-geocode-source-btn .map-source-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}
.hosp-geocode-card .hosp-geocode-source-btn:hover {
  border-color: #999;
  color: #000;
}
.hosp-geocode-card .hosp-geocode-zoom-label {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
  padding-left: 4px;
  border-left: 1px solid #ddd;
}
.hosp-geocode-card .hosp-geocode-zoom-btns {
  display: flex;
  gap: 4px;
  transition: opacity 0.2s;
}
.hosp-geocode-card .hosp-geocode-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.hosp-geocode-card .hosp-geocode-btn:hover {
  border-color: #999;
  color: #000;
}
.hosp-geocode-card .hosp-geocode-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}
.hosp-geocode-card .geo-logo-icon {
  background: transparent !important;
  border: none !important;
}
.hosp-geocode-card .geo-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: white;
  padding: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.hosp-geocode-card .geo-logo-icon-main img {
  box-shadow: 0 0 0 2px #007bff, 0 2px 6px rgba(0, 0, 0, 0.4);
}
.hosp-geocode-card .geo-hcode-label {
  width: 100%;
  height: 100%;
  font-size: 8px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  padding: 0 1px;
}
.hosp-geocode-card .geo-logo-icon-main .geo-hcode-label {
  font-size: 15px;
  box-shadow: 0 0 0 2px #007bff, 0 2px 6px rgba(0, 0, 0, 0.4);
}
.hosp-geocode-card .hosp-nearby-section {
  margin-top: 16px;
  border-top: 1px solid #ddd;
  padding-top: 12px;
}
.hosp-geocode-card .hosp-nearby-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 8px;
}
.hosp-geocode-card .hosp-nearby-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hosp-geocode-card .hosp-nearby-loading,
.hosp-geocode-card .hosp-nearby-error {
  font-size: 13px;
  color: #aaa;
  padding: 6px 0;
}
.hosp-geocode-card .hosp-nearby-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}
.hosp-geocode-card .hosp-nearby-row:last-child {
  border-bottom: none;
}
.hosp-geocode-card .hosp-nearby-row:hover {
  background: #f5f5f5;
}
.hosp-geocode-card .hosp-nearby-rank {
  font-size: 13px;
  color: #bbb;
  width: 14px;
  text-align: right;
  flex-shrink: 0;
}
.hosp-geocode-card .hosp-nearby-logo-link {
  flex-shrink: 0;
  text-decoration: none;
}
.hosp-geocode-card .hosp-nearby-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.hosp-geocode-card .hosp-nearby-hcode {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 10px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.hosp-geocode-card a.hosp-nearby-names {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.hosp-geocode-card a.hosp-nearby-names:hover .hosp-nearby-name {
  text-decoration: underline;
}
.hosp-geocode-card .hosp-nearby-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hosp-geocode-card .hosp-nearby-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hosp-geocode-card .hosp-nearby-detail .hosp-nearby-shortname {
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hosp-geocode-card .hosp-nearby-detail .tooltip-sector {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 1px 6px 1px 3px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.hosp-geocode-card .hosp-nearby-detail .tooltip-sector img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}
.hosp-geocode-card .hosp-nearby-detail .tooltip-sector {
  font-size: 10px;
  margin-top: 0;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.hosp-geocode-card .hosp-nearby-row:hover .tooltip-sector {
  opacity: 1;
}
.hosp-geocode-card .hosp-nearby-map-link {
  font-size: 13px;
  font-weight: 600;
  color: #007bff;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s;
}
.hosp-geocode-card .hosp-nearby-map-link:hover {
  opacity: 1;
  text-decoration: underline;
}
.hosp-geocode-card .hosp-nearby-row:hover .hosp-nearby-map-link {
  opacity: 0.7;
}
.hosp-geocode-card .hosp-nearby-gmaps-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.hosp-geocode-card .hosp-nearby-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 13px;
  color: #666;
  flex: 0 0 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hosp-geocode-card .hosp-nearby-state.hosp-nearby-state-same {
  opacity: 0.3;
}
.hosp-geocode-card .hosp-nearby-state-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}
.hosp-geocode-card .hosp-nearby-header-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  margin: 0 2px 0 4px;
}
.hosp-geocode-card .hosp-nearby-header-name {
  font-weight: 600;
}
.hosp-geocode-card .hosp-nearby-dist {
  font-size: 13px;
  color: #888;
  flex: 0 0 48px;
  text-align: right;
  white-space: nowrap;
}
.hosp-geocode-card .hosp-nearby-time-link {
  flex: 0 0 68px;
  text-align: right;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.hosp-geocode-card .hosp-nearby-time {
  font-size: 13px;
  font-weight: 600;
  color: #007bff;
  white-space: nowrap;
}
.hosp-geocode-card .hosp-nearby-dir-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 10px;
  color: #007bff;
  white-space: nowrap;
  visibility: hidden;
}
.hosp-geocode-card .hosp-nearby-row:hover .hosp-nearby-dir-label {
  visibility: visible;
}
.hosp-geocode-card .hosp-nearby-time-link:hover .hosp-nearby-dir-label {
  text-decoration: underline;
}
.hosp-geocode-card .hosp-nearby-unit {
  font-weight: 400;
  opacity: 0.7;
}

.hosp-ubicacion-outer {
  display: flex;
  gap: 12px;
  position: relative;
  align-items: flex-start;
}
.hosp-ubicacion-outer > .hosp-section-body {
  flex: 1;
  min-width: 0;
}
.hosp-ubicacion-outer.photos-collapsed .hosp-photos-panel {
  position: absolute;
  top: 0;
  right: 0;
  margin-top: -25px;
}

.hosp-ubicacion-main {
  flex: 1;
  min-width: 0;
}

.hosp-photos-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  margin-top: -25px;
}

.hosp-photos-toggle {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hosp-photos-toggle .hosp-photos-chevron {
  font-size: 9px;
}
.hosp-photos-toggle:hover {
  color: #666;
}

.hosp-photos-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.hosp-photos-col > img {
  max-width: 150px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.15s;
}
.hosp-photos-col > img:hover {
  opacity: 1;
}
.hosp-photos-col:empty {
  display: none;
}

.hosp-photo-callout {
  display: none;
  position: absolute;
  right: 100%;
  margin-right: 16px;
  z-index: 100;
  pointer-events: none;
  background: white;
  border: 1px solid #aaa;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.hosp-photo-callout.visible {
  display: block;
}
.hosp-photo-callout::before {
  content: "";
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  border: 11px solid transparent;
  border-left-color: #aaa;
  border-right-width: 0;
}
.hosp-photo-callout::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border: 10px solid transparent;
  border-left-color: white;
  border-right-width: 0;
}
.hosp-photo-callout img {
  display: block;
  max-width: 600px;
  max-height: 500px;
  border-radius: 4px;
  object-fit: contain;
}

.hosp-nearby-header {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}
.hosp-nearby-header:hover {
  color: #666;
}

.hosp-nearby-chevron {
  font-size: 10px;
  color: #999;
}

.hosp-escalas-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}

.escalas-sm-section {
  margin-top: 12px;
}

.escalas-sm-header {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  user-select: none;
}
.escalas-sm-header:hover {
  background: rgba(0, 0, 0, 0.03);
}

.escalas-sm-chevron {
  font-size: 10px;
  color: #999;
}

.escalas-sm-title {
  font-size: 13px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#escalas-small-multiples {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 4px 0;
}

.escalas-main-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 10px;
}
@media (max-width: 800px) {
  .escalas-main-row {
    flex-direction: column;
  }
}

.escalas-chart-col {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 480px;
}

.escalas-desc-panel {
  flex: 1 1 50%;
  height: 480px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fafafa;
  min-width: 0;
}

.escalas-desc-menu {
  display: flex;
  flex-direction: column;
  padding: 16px 0 8px;
}

.escalas-menu-header {
  cursor: default;
  padding-top: 4px;
  padding-bottom: 4px;
  border-bottom: none;
}
.escalas-menu-header:hover {
  background: none;
}

.escalas-menu-header-value {
  font-size: 10px;
  letter-spacing: 0;
  max-width: 24px;
  box-sizing: border-box;
  padding-right: 15px;
  overflow: visible;
  display: flex;
  justify-content: flex-end;
}

.escalas-menu-header-median {
  font-size: 10px;
  font-weight: 700;
  color: #999;
  letter-spacing: 0;
  max-width: 30px;
  overflow: visible;
}

.escalas-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 36px 12px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #eee;
}
.escalas-menu-item:hover {
  background: rgba(66, 133, 244, 0.06);
}

.escalas-menu-logo {
  height: 24px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
}

.escalas-menu-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.escalas-menu-value {
  font-size: 13px;
  font-weight: 700;
  color: #007bff;
  min-width: 24px;
  text-align: left;
}

.escalas-menu-median {
  font-size: 13px;
  font-weight: 500;
  color: #999;
  min-width: 30px;
  text-align: left;
}

.escalas-desc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
}
.escalas-desc-header.escalas-desc-header-back {
  cursor: pointer;
}
.escalas-desc-header.escalas-desc-header-back:hover {
  background: #f0f0f0;
}

.escalas-desc-back {
  font-size: 10px;
  color: #999;
}

.escalas-desc-logo {
  height: 24px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
}

.escalas-desc-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.escalas-desc-entries {
  padding: 4px 0;
}

.escalas-desc-preamble {
  max-width: 75%;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.3;
  color: #666;
  font-style: italic;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.015);
}
.escalas-desc-preamble.escalas-desc-preamble-sticky {
  position: sticky;
  top: 41px;
  z-index: 1;
  max-width: 100%;
  background: #f5f5f5;
}

.escalas-desc-preamble-child {
  margin-left: 16px;
  border-left: 3px solid rgba(0, 0, 0, 0.06);
}

.escalas-desc-sub {
  margin-left: 36px;
  border-left: 3px solid rgba(0, 0, 0, 0.06);
}

.escalas-desc-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 12px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.1s, border-color 0.1s;
}
.escalas-desc-entry:hover {
  background: rgba(0, 0, 0, 0.03);
}

.escalas-desc-hover:not(.escalas-desc-active) {
  background: rgba(0, 0, 0, 0.04);
  border-left-color: #ccc;
}
.escalas-desc-hover:not(.escalas-desc-active) .escalas-desc-score-label {
  background: #333;
  color: #fff;
}

.escalas-desc-active {
  background: rgba(66, 133, 244, 0.08) !important;
  border-left-color: #007bff;
}
.escalas-desc-active .escalas-desc-score-label {
  background: #007bff;
  color: #fff;
}

.escalas-desc-goal .escalas-desc-score-label {
  border: 1.5px solid #d4a017;
  flex-direction: column;
  height: auto;
  padding: 2px 4px;
  transition: background 0.15s, color 0.15s;
}
.escalas-desc-goal .escalas-desc-score-label::after {
  content: "META";
  font-size: 7px;
  font-weight: 700;
  color: #d4a017;
  letter-spacing: 0.3px;
  line-height: 1;
  transition: color 0.15s;
}

.escalas-desc-goal:hover .escalas-desc-score-label {
  background: #d4a017;
  color: #fff;
}
.escalas-desc-goal:hover .escalas-desc-score-label::after {
  color: #fff;
}

.escalas-desc-active.escalas-desc-goal .escalas-desc-score-label {
  border-color: #007bff;
}
.escalas-desc-active.escalas-desc-goal .escalas-desc-score-label::after {
  color: rgba(255, 255, 255, 0.85);
}

.escalas-desc-score-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  padding: 0 4px;
  border-radius: 4px;
  background: #e8e8e8;
  color: #333;
  font-size: 13px;
  font-weight: 800;
  margin-top: 1px;
}

.escalas-desc-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
  color: #333;
  min-width: 0;
}
.escalas-desc-text b {
  font-weight: 600;
}
.escalas-desc-text ol {
  list-style: none;
  counter-reset: esc-item;
  margin: 2px 0;
  padding-left: 0;
}
.escalas-desc-text li {
  counter-increment: esc-item;
  margin-bottom: 4px;
  padding-left: 20px;
  position: relative;
}
.escalas-desc-text li::before {
  content: counter(esc-item);
  position: absolute;
  left: 0;
  top: 1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ddd;
  color: #555;
  font-size: 9px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}
.escalas-desc-text .escalas-sublist {
  margin: 3px 0 1px;
  padding-left: 0;
  font-size: 10px;
  line-height: 1.25;
  color: #555;
}
.escalas-desc-text .escalas-sublist li {
  margin-bottom: 2px;
  padding-left: 18px;
}
.escalas-desc-text .escalas-sublist li::before {
  width: 13px;
  height: 13px;
  font-size: 8px;
  line-height: 13px;
  background: #e8e8e8;
  color: #999;
}

.escalas-mini-link {
  display: inline-block;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.escalas-mini-link .mini-label,
.escalas-mini-link .mini-value {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.escalas-mini-link .mini-center {
  transition: transform 0.15s ease;
}
.escalas-mini-link:hover {
  transform: scale(1.5);
  z-index: 10;
}
.escalas-mini-link:hover .mini-label,
.escalas-mini-link:hover .mini-value {
  opacity: 1;
}
.escalas-mini-link:hover .mini-center {
  transform: scale(1.3);
}
.escalas-mini-link.escalas-mini-current {
  outline: 2px solid rgba(66, 133, 244, 0.5);
}

.hosp-map-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 300px;
  position: relative;
}

.hosp-map-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 4px;
}

.hosp-map-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-link-btn {
  position: absolute;
  right: 0;
  text-decoration: none;
  opacity: 0.2;
  transition: opacity 0.15s;
  line-height: 1;
}
.map-link-btn img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.map-link-btn:hover {
  opacity: 0.7;
}

.hosp-map-toolbar-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.hosp-map-container {
  position: relative;
  flex: 1;
  min-height: 200px;
}
.hosp-map-container #hosp-state-map {
  width: 100%;
  height: 100%;
  background: transparent;
  transition: background 0.15s;
  cursor: default;
}
.hosp-map-container #hosp-state-map path.leaflet-interactive {
  cursor: default;
  transition: fill 0.15s ease, stroke-width 0.15s ease;
}
.hosp-map-container #hosp-state-map.view-region path.leaflet-interactive {
  cursor: pointer;
}
.hosp-map-container .map-logos-overlay {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}
.hosp-map-container .map-connector-line {
  stroke-width: 2.5;
}
.hosp-map-container .map-hospital-logo.hcode-label {
  padding: 0 2px;
}
.hosp-map-container .map-hospital-logo.unfocused {
  opacity: 0.6;
}
.hosp-map-container .map-hospital-logo.unfocused:hover {
  opacity: 1;
}

.geo-tooltip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.geo-tooltip .tooltip-sector {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 1px 6px 1px 3px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.geo-tooltip .tooltip-sector img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.hosp-map-tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  max-width: 220px;
  white-space: normal;
}
.hosp-map-tooltip .tooltip-name {
  font-weight: 600;
  margin-bottom: 1px;
}
.hosp-map-tooltip .tooltip-city {
  color: #666;
  font-size: 13px;
}
.hosp-map-tooltip .tooltip-sector {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 1px 6px 1px 3px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.hosp-map-tooltip .tooltip-sector img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}
.hosp-map-tooltip .tooltip-hcode {
  color: #999;
  font-size: 10px;
}

.minimap-state-tooltip {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hosp-map-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 15px;
  background: #f8f8f8;
  border-radius: 6px;
  min-height: 200px;
}

.hosp-map-container .map-hospital-logo.logo-hover {
  transform: translate(-50%, -50%) scale(1.8);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  z-index: 100;
}
.hosp-map-container .map-hospital-logo.hosp-map-current {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #007bff, 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
  cursor: default;
}
.hosp-map-container .map-hospital-logo.hosp-map-current:hover {
  transform: translate(-50%, -50%) scale(1.1);
}
.hosp-map-container .map-hospital-logo.hosp-map-other {
  width: 32px;
  height: 32px;
}
.hosp-map-container .map-hospital-logo.hosp-map-other:hover {
  transform: translate(-50%, -50%) scale(1.5);
}

.hosp-related-wrap {
  min-width: 0;
  overflow: hidden;
}

.hosp-map-card .hosp-related {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  margin-top: 8px;
}

.hosp-related-list {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: clip;
  max-width: 100%;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}
.hosp-related-list::-webkit-scrollbar {
  height: 0;
}
.hosp-related-list {
  scrollbar-width: none;
}

.hosp-related-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.hosp-related-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.hosp-related-item .related-hcode-label {
  width: 40px;
  height: 40px;
  font-size: 13px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  max-width: none;
}
.hosp-related-item:hover span {
  color: #007bff;
}
.hosp-related-item.related-hover {
  transform: scale(1.3);
  z-index: 10;
}

.hosp-related-note {
  font-size: 13px;
  color: #666;
}

.hosp-related-note-solo {
  font-size: 13px;
  color: #666;
  text-align: center;
  padding: 8px 0;
  border-top: 1px solid #eee;
  margin-top: 8px;
}

.hosp-map-pill {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
  overflow: hidden;
  background: #ddd;
}
.hosp-map-pill .map-pill-value {
  font-size: 12px;
  font-weight: 500;
  color: #333;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 1px 8px;
  line-height: 1.3;
}
.hosp-map-pill .map-pill-value .estado-icon, .hosp-map-pill .map-pill-value .region-icon-sm {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.hosp-map-pill .map-pill-bottom {
  display: flex;
  align-items: center;
  border-top: 1px solid #ddd;
  flex: 1;
}
.hosp-map-pill .map-pill-label {
  flex: 1;
  font-size: 10px;
  color: #666;
  background: #f5f5f5;
  padding: 0 7px;
  line-height: 1.8;
  text-align: center;
}
.hosp-map-pill .map-pill-count {
  font-size: 10px;
  font-weight: 600;
  color: #666;
  padding: 0 5px;
  border-left: 1px solid #ddd;
  line-height: 1.8;
  background: #fff;
}
.hosp-map-pill.active {
  border-color: #555;
  box-shadow: 0 0 0 1px #555;
  background: #555;
}
.hosp-map-pill.active .map-pill-label {
  background: #555;
  color: #fff;
  border-color: #555;
}
.hosp-map-pill.active .map-pill-bottom {
  border-color: #555;
}
.hosp-map-pill:not(.active) {
  opacity: 0.7;
}
.hosp-map-pill:not(.active):hover {
  border-color: #007bff;
  opacity: 1;
  background: #007bff;
}
.hosp-map-pill:not(.active):hover .map-pill-label {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}
.hosp-map-pill:not(.active):hover .map-pill-bottom {
  border-color: #007bff;
}

.map-pill-region {
  display: grid;
  grid-template-columns: auto 1fr;
  border-color: color-mix(in srgb, var(--region-text) 30%, transparent);
}
.map-pill-region .map-pill-region-head {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  padding: 2px 5px;
  background: color-mix(in srgb, var(--region-bg) 50%, var(--region-text));
  border-right: 1px solid color-mix(in srgb, var(--region-text) 30%, transparent);
}
.map-pill-region .map-pill-region-head .region-icon-sm {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.map-pill-region .map-pill-value {
  grid-row: 1;
  grid-column: 2;
  background: var(--region-bg);
  color: var(--region-text);
}
.map-pill-region .map-pill-bottom {
  grid-column: 1/-1;
}
.map-pill-region.active {
  border-color: #555;
  box-shadow: 0 0 0 1px #555;
}

.hosp-cap-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .hosp-cap-row-2 {
    grid-template-columns: 1fr;
  }
}

.hosp-cap-row-1 {
  margin-top: 16px;
}
.hosp-cap-row-1 .cap-grid {
  justify-content: start;
}

.hosp-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  transition: border-color 0.15s;
}
.hosp-section:hover {
  border-color: #555;
}
.hosp-section:hover > .hosp-section-label .hosp-section-icon {
  opacity: 1;
  color: #555;
}
.hosp-section:hover > .hosp-section-label .hosp-section-icon-img {
  opacity: 1;
  background: #555;
}
.hosp-section:hover > .hosp-section-label .hosp-section-title {
  color: #555;
}
.hosp-section:has(.cap-subsection:hover) {
  border-color: #333;
}
.hosp-section:has(.cap-subsection:hover) > .hosp-section-label .hosp-section-icon {
  color: #333;
}
.hosp-section:has(.cap-subsection:hover) > .hosp-section-label .hosp-section-icon-img {
  background: #333;
}
.hosp-section:has(.cap-subsection:hover) > .hosp-section-label .hosp-section-title {
  color: #333;
}

.hosp-section-content {
  flex: 1;
}

.hosp-section-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.hosp-section-label.hosp-collapsible {
  user-select: none;
}

.hosp-collapse-chevron,
.hosp-collapsible .hosp-section-title {
  cursor: pointer;
}

.hosp-collapse-chevron,
.hosp-section-title {
  padding: 16px 4px;
  margin: -16px -4px;
}

.hosp-collapse-chevron {
  padding-left: 12px;
  margin-left: -12px;
  margin-right: 0;
}

.hosp-section-label .sankey-findings-link {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.hosp-section-label .sankey-findings-link:hover {
  opacity: 1;
  color: #007bff;
  text-decoration: underline;
}

.hosp-profile-findings-link {
  display: inline;
  font-size: 13px;
  color: #666;
  text-decoration: none;
  float: right;
  margin-top: 12px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.hosp-profile-findings-link:hover {
  opacity: 1;
  color: #007bff;
  text-decoration: underline;
}

.hosp-collapse-chevron {
  font-size: 9px;
  color: #666;
  width: 10px;
  text-align: center;
  flex-shrink: 0;
}

.hosp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}

.hosp-section-icon {
  font-size: 28px;
  opacity: 0.25;
  transition: opacity 0.15s, color 0.15s;
}

.hosp-section-icon-img {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: #666;
  opacity: 0.25;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  transition: opacity 0.15s, background 0.15s;
}

.hosp-patients-table-wrapper {
  width: 100%;
}

.hosp-patients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}
.hosp-patients-table th, .hosp-patients-table td {
  padding: 4px 6px;
  text-align: center;
}
.hosp-patients-table th {
  font-weight: 400;
  color: #666;
  font-size: 13px;
}
.hosp-patients-table td {
  font-size: 13px;
}
.hosp-patients-table .avg-header {
  background: #f8f8f8;
  font-size: 10px;
}
.hosp-patients-table .avg-cell {
  background: #f8f8f8;
}
.hosp-patients-table .sparkline {
  fill: #000;
  vertical-align: middle;
  margin-right: 4px;
}
.hosp-patients-table .row-label {
  font-size: 13px;
  color: #666;
  text-align: right;
  white-space: nowrap;
  padding-right: 10px;
}

.hosp-patients-meta {
  display: flex;
  gap: 4px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.hosp-patient-origin {
  margin-top: 16px;
}

.hosp-origin-title {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.hosp-origin-bars {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
}

.hosp-origin-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  min-width: 50px;
}
.hosp-origin-bar.city {
  background: #555;
  color: white;
}
.hosp-origin-bar.state {
  background: #A9A9A9;
  color: white;
}
.hosp-origin-bar.other {
  background: #D3D3D3;
  color: #333;
}
.hosp-origin-bar .pct {
  font-size: 13px;
  font-weight: 600;
}
.hosp-origin-bar .lbl {
  font-size: 10px;
}

.cap-grid {
  display: grid;
  gap: 16px;
}
.cap-grid.cap-grid-2 {
  grid-template-columns: repeat(2, auto);
  justify-content: start;
}
.cap-grid.cap-grid-3 {
  grid-template-columns: repeat(3, auto);
  justify-content: start;
}
@media (max-width: 700px) {
  .cap-grid {
    grid-template-columns: 1fr;
  }
}

.cap-subsection {
  padding: 8px 10px;
  background: #fafafa;
  border-radius: 4px;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  transition: border-color 0.15s, background 0.15s;
}
.cap-subsection:hover {
  border-color: #555;
  background: rgba(85, 85, 85, 0.04);
}
.cap-subsection:hover .cap-subsection-title {
  color: #555;
}
.cap-subsection:hover .cap-icon {
  opacity: 1;
  background: #555;
}

.cap-subsection-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  transition: color 0.15s;
}

.cap-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 2px;
  background: #666;
  opacity: 0.5;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  transition: opacity 0.15s, background 0.15s;
}

.cap-pill {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  overflow: hidden;
  margin: 2px 0;
}
.cap-pill .cap-pill-label {
  display: flex;
  align-items: center;
  padding: 3px 7px;
  background: #f5f5f5;
  color: #666;
  font-size: 10px;
  border-right: 1px solid #ddd;
  white-space: normal;
  line-height: 1.3;
  text-align: right;
}
.cap-pill .cap-pill-value {
  display: flex;
  align-items: center;
  padding: 3px 8px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}
.cap-pill.cap-yes .cap-pill-value {
  color: #28a745;
}
.cap-pill.cap-no .cap-pill-value {
  color: #dc3545;
}
.cap-pill.cap-number .cap-pill-value {
  color: #333;
  background: #f8f9fa;
}
.cap-pill.cap-falsy .cap-pill-value {
  color: #ccc;
}
.cap-pill.cap-subroga .cap-pill-value {
  color: #9e7530;
  font-size: 9px;
  font-weight: 500;
}

body.filter-enabled .hosp-tag[data-field] {
  cursor: pointer;
  transition: border-color 0.15s;
}
body.filter-enabled .hosp-tag[data-field]:hover {
  border-color: #007bff;
}
body.filter-enabled .hosp-tag[data-field]:hover .hosp-tag-label {
  background: #007bff;
  color: white;
  border-color: #007bff;
}
body.filter-enabled .cap-pill[data-field] {
  cursor: pointer;
  transition: border-color 0.15s;
}
body.filter-enabled .cap-pill[data-field]:hover {
  border-color: #007bff;
}
body.filter-enabled .cap-pill[data-field]:hover .cap-pill-label {
  background: #007bff;
  color: white;
}

.hosp-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-bottom: 8px;
  font-size: 17px;
}

.hosp-filter-link {
  color: #555;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.15s;
}
.hosp-filter-link:hover {
  color: #007bff;
}

span.hosp-filter-link {
  color: #007bff;
}

.hosp-filter-toggle-arrow {
  font-size: 10px;
  color: #666;
  transition: transform 0.2s ease;
  user-select: none;
  padding: 10px 4px;
  margin: -10px -4px;
  cursor: pointer;
}
.hosp-filter-toggle-arrow.open {
  transform: rotate(90deg);
}

.hosp-filter-text {
  flex: 1;
  font-size: 17px;
  color: #333;
  padding: 10px 0;
  margin: -10px 0;
  cursor: pointer;
}

.hosp-filter-count {
  font-weight: 400;
  color: #333;
}
span.hosp-filter-link ~ .hosp-filter-count {
  font-weight: 700;
}

.hosp-filter-clear-btn {
  font-size: 13px;
  font-weight: 600;
  color: #007bff;
  background: none;
  border: 1px solid #007bff;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  visibility: hidden;
  transition: all 0.15s;
}
.hosp-filter-clear-btn.visible {
  visibility: visible;
}
.hosp-filter-clear-btn:hover {
  color: #dc3545;
  border-color: #dc3545;
}

.hosp-compare-btn {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: none;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.hosp-compare-btn:hover {
  border-color: #007bff;
  color: #007bff;
}
.hosp-compare-btn.hidden {
  display: none;
}

.ac-compare-item .ac-compare-check {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: #007bff;
  font-weight: 700;
}
.ac-compare-item.ac-compare-selected {
  background: rgba(0, 123, 255, 0.06);
}
.ac-compare-item .ac-compare-you {
  font-style: italic;
  color: #666;
  font-size: 0.85em;
}

.hosp-filter-active-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 0 6px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hosp-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}
.hosp-active-pill strong {
  font-weight: 700;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
}

.hosp-active-pill-body {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  background: #e7f1ff;
  border: 1px solid color-mix(in srgb, #007bff 40%, #ddd);
  border-radius: 4px;
  transition: all 0.15s;
}
.hosp-active-pill:hover .hosp-active-pill-body {
  border-color: #dc3545;
  background: color-mix(in srgb, #dc3545 8%, white);
}
.hosp-active-pill:hover .hosp-active-pill-body .hosp-active-pill-label {
  background: color-mix(in srgb, #dc3545 12%, #f5f5f5);
}

.hosp-active-pill-label {
  padding: 2px 6px;
  background: color-mix(in srgb, #007bff 12%, #f0f0f0);
  color: #666;
  font-size: 10px;
  border-right: 1px solid color-mix(in srgb, #007bff 20%, #ddd);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: background 0.15s;
}
.hosp-active-pill-label.has-icon {
  padding-left: 5px;
}

.hosp-active-pill-logo {
  height: 16px;
  width: 16px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 2px;
  margin-left: 4px;
  margin-right: 4px;
  align-self: center;
}

.hosp-active-pill-x {
  font-size: 14px;
  line-height: 1;
  color: #888;
  font-weight: 300;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}
.hosp-active-pill:hover .hosp-active-pill-x {
  color: #dc3545;
}

.hap-section-divider {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 2px 3px;
  border-radius: 3px;
  transition: background 0.15s;
  vertical-align: middle;
}
.hap-section-divider:hover {
  background: color-mix(in srgb, #007bff 12%, transparent);
}
.hap-section-divider:first-child {
  margin-left: 0;
}

.hap-section-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: #666;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: middle;
}

.hap-section-emoji {
  font-size: 13px;
  line-height: 1;
}

.hosp-active-pill-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 2px;
  align-self: center;
}

.hfp-section-highlight {
  outline: 2px solid #007bff;
  outline-offset: -1px;
  border-radius: 6px;
  transition: outline-color 0.3s ease;
}
.hfp-section-highlight:not(.hfp-section-highlight) {
  outline-color: transparent;
}

.hosp-filter-palette-wrapper {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  max-height: 400px;
  overflow-y: auto;
  position: relative;
  user-select: none;
}

.hfp-section {
  margin-bottom: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 8px 10px;
  transition: border-color 0.15s;
}
.hfp-section:last-child {
  margin-bottom: 0;
}
.hfp-section:hover {
  border-color: #555;
}
.hfp-section:hover > .hfp-section-title {
  color: #555;
}
.hfp-section:hover > .hfp-section-title .hfp-section-icon {
  background: #555;
}
.hfp-section:has(.hfp-subsection:hover) {
  border-color: #333;
}
.hfp-section:has(.hfp-subsection:hover) > .hfp-section-title {
  color: #333;
}
.hfp-section:has(.hfp-subsection:hover) > .hfp-section-title .hfp-section-icon {
  background: #333;
}

.hfp-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.hfp-section-chevron {
  display: inline-block;
  width: 1.2em;
  font-size: 8px;
}

.hfp-section-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  position: relative;
}

.hfp-pill {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
}
.hfp-pill:hover {
  border-color: #007bff;
}
.hfp-pill:hover .hfp-pill-label {
  background: #007bff;
  color: white;
}
.hfp-pill.hfp-has-filter {
  border-color: #007bff;
  box-shadow: 0 0 0 1px #007bff;
}

.hfp-pill-label {
  padding: 1px 5px;
  background: #f5f5f5;
  color: #333;
  font-size: 12px;
  border-right: 1px solid #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  transition: background 0.15s, color 0.15s;
}

.hfp-pill-value {
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}
.hfp-pill-value.hfp-val-yes {
  color: #28a745;
}
.hfp-pill-value.hfp-val-no {
  color: #dc3545;
}
.hfp-pill-value.hfp-val-sub {
  color: #9e7530;
}
.hfp-pill-value.hfp-val-dash {
  color: #ccc;
}

.hfp-pill[data-field=Estado] .hfp-pill-value {
  max-width: none;
}

.hfp-pill-status .hfp-pill-value,
.hfp-pill-sector .hfp-pill-value {
  color: inherit;
  font-weight: 600;
}

.hfp-pill-sector .hfp-pill-sector-icon,
.hfp-pill-estado .hfp-pill-escudo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: 2px;
}

.hfp-pill-active {
  border-color: #007bff;
  background: #eef4ff;
  z-index: 101;
}

.hfp-pill-pinned {
  border-color: #007bff;
  background: #eef4ff;
}
.hfp-pill-pinned .hfp-pill-label {
  background: #007bff;
  color: white;
}

.hfp-section-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  margin-right: 3px;
  background: #666;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  transition: background 0.15s;
}

.hfp-subsection {
  margin: 2px 0;
  padding: 6px 8px;
  align-self: start;
  border: 1px solid #eee;
  border-radius: 4px;
  transition: border-color 0.15s;
}
[data-hfp-section=Diagnósticos] .hfp-subsection, [data-hfp-section=Personal] .hfp-subsection {
  width: calc(33.33% - 3px);
}
[data-hfp-section=Infraestructura] .hfp-subsection {
  width: calc(33.33% - 3px);
}

.hfp-sub-title {
  font-size: 10px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
  transition: color 0.15s;
}

.hfp-subsection:hover {
  border-color: #555;
}
.hfp-subsection:hover .hfp-sub-title {
  color: #555;
}
.hfp-subsection:hover .hfp-sub-icon {
  background: #555;
}

.hfp-sub-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 2px;
  background: #666;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  transition: background 0.15s;
}

.hfp-sub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.hfp-dropdown {
  position: absolute;
  z-index: 100;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 160px;
  max-width: 400px;
  margin-top: 10px;
}
.hfp-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: white;
  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
  transform: rotate(45deg);
}

.hfp-dd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.hfp-dd-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.hfp-dd-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.hfp-dd-close:hover {
  color: #333;
}

.hfp-dd-values {
  column-gap: 8px;
}

.hfp-dd-value {
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  break-inside: avoid;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hfp-dd-value:hover {
  background: #f8f9fa;
}
.hfp-dd-value.selected {
  background: color-mix(in srgb, #007bff 15%, white);
  font-weight: 600;
}

.hfp-dd-count {
  font-size: 10px;
  color: #888;
  opacity: 0;
  transition: opacity 0.15s;
}
.hfp-dd-value:hover .hfp-dd-count {
  opacity: 1;
}

.hfp-dd-escudo {
  width: 18px;
  height: 14px;
  object-fit: contain;
  margin-right: 4px;
  flex-shrink: 0;
}

.hfp-dd-region {
  border-radius: 4px;
}
.hfp-dd-region.selected, .hfp-dd-region:hover {
  background: var(--region-bg);
  color: var(--region-text);
}

.hfp-dd-region-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 18px;
  margin: -2px 5px -2px -4px;
  border-radius: 3px 0 0 3px;
  background: color-mix(in srgb, var(--region-bg) 50%, var(--region-text));
  flex-shrink: 0;
}

.hfp-dd-region-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.hfp-hcode-dropdown {
  min-width: 280px;
  max-width: 360px;
}

.hfp-hcode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.hfp-hcode-chips:empty {
  margin-bottom: 0;
}

.hfp-hcode-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: #e7f1ff;
  border: 1px solid color-mix(in srgb, #007bff 40%, #ddd);
  border-radius: 4px;
  font-size: 13px;
  cursor: default;
}

.hfp-hcode-chip-x {
  cursor: pointer;
  color: #666;
  font-size: 13px;
  line-height: 1;
}
.hfp-hcode-chip-x:hover {
  color: #dc3545;
}

.hfp-hcode-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  user-select: text;
}
.hfp-hcode-input:focus {
  border-color: #007bff;
}

.hfp-hcode-results {
  margin-top: 4px;
}

.hfp-hcode-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.hfp-hcode-result:hover, .hfp-hcode-result.hfp-hcode-highlighted {
  background: #f8f9fa;
}
.hfp-hcode-result.selected {
  background: #e7f1ff;
}

.hfp-hcode-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  flex-shrink: 0;
}
.hfp-hcode-logo.hcode-label {
  font-size: 10px;
  border-radius: 4px;
}

.hfp-hcode-result-text {
  flex: 1;
  min-width: 0;
}

.hfp-hcode-nickname {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hfp-hcode-fullname {
  font-size: 10px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hfp-hcode-badge {
  flex-shrink: 0;
}
.hfp-hcode-badge.hcode-label {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
}

.hosp-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 0 0 16px;
}

.hfg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.hfg-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.hfg-card.hfg-current {
  border-color: #007bff;
  background: color-mix(in srgb, #007bff 6%, white);
  box-shadow: 0 0 0 1px #007bff;
}

.hfg-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  margin-bottom: 6px;
}
.hfg-logo.hcode-label {
  font-size: 13px;
  border-radius: 6px;
}

.hfg-card-text {
  min-width: 0;
  width: 100%;
}

.hfg-nickname {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hfg-fullname {
  font-size: 10px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.hfg-hcode-tiny {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 8px;
  font-weight: 600;
  color: #888;
  line-height: 1;
  opacity: 0.4;
}

.hfg-dims {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
}

.hfg-dim-label {
  padding: 1px 4px;
  background: #f5f5f5;
  color: #666;
  font-weight: 400;
  font-size: 9px;
  border-right: 1px solid #ddd;
}

.hfg-dim-value {
  padding: 1px 4px;
  font-weight: 500;
}

.hfg-dim-sector {
  padding: 1px 5px;
  font-weight: 600;
}
.hfg-dim-sector .hfg-dim-value {
  display: flex;
  align-items: center;
  gap: 3px;
}

.hfg-dim-photo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hfg-dim-pill {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  font-size: 10px;
  border-radius: 3px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
}
.hfg-dim-pill.hfg-dim-muted {
  color: #999;
}
.hfg-dim-pill.hfg-dim-yes {
  color: #28a745;
}
.hfg-dim-pill.hfg-dim-no {
  color: #dc3545;
}
.hfg-dim-pill.hfg-dim-long {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hfg-dim-pill.hfg-dim-long .hfg-dim-label {
  margin-right: 0;
}
.hfg-dim-pill.hfg-dim-presence {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px 2px 2px;
}
.hfg-dim-pill.hfg-dim-presence .hfg-dim-presence-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.hfg-dim-pill.hfg-dim-presence .hfg-dim-label {
  margin-right: 0;
  font-size: 9px;
}
.hfg-dim-pill.hfg-dim-presence .hfg-dim-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.hfg-dim-pill.hfg-dim-estado {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f5f5f5;
}
.hfg-dim-pill.hfg-dim-region {
  display: inline-flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.hfg-dim-pill.hfg-dim-region.region-colored {
  background: var(--region-bg);
  color: var(--region-text);
  border: 1px solid color-mix(in srgb, var(--region-text) 30%, transparent);
  font-weight: 600;
  padding-right: 5px;
}
.hfg-dim-pill.hfg-dim-region.region-colored .hfg-dim-region-head {
  background: color-mix(in srgb, var(--region-bg) 50%, var(--region-text));
}

.hfg-dim-escudo {
  width: 14px;
  height: 11px;
  object-fit: contain;
  flex-shrink: 0;
}

.hfg-dim-region-head {
  display: flex;
  align-items: center;
  padding: 1px 3px;
  margin-right: 3px;
  border-right: 1px solid #ddd;
}

.hfg-dim-region-icon {
  width: 11px;
  height: 11px;
  object-fit: contain;
}

.hfg-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 15px;
}

.hfp-section-emoji {
  font-size: 16px;
  vertical-align: -2px;
  margin-right: 2px;
}

.hfp-pill-escala .hfp-pill-escala-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: 2px;
}

.hfg-dim-escala {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 4px;
}

.hfg-dim-escala-logo {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.hfg-mini-radar {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  overflow: visible;
}

.hfg-radar-wrap {
  display: inline-block;
  border-radius: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hfg-radar-wrap .mini-label,
.hfg-radar-wrap .mini-value {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.hfg-radar-wrap .mini-label-active,
.hfg-radar-wrap .mini-value-active {
  opacity: 1 !important;
}
.hfg-radar-wrap:hover {
  transform: scale(1.5);
  z-index: 10;
}
.hfg-radar-wrap:hover .mini-label,
.hfg-radar-wrap:hover .mini-value {
  opacity: 1;
}

.hfp-dd-status {
  border-radius: 4px;
  margin-bottom: 2px;
  font-weight: 600;
}
.hfp-dd-status .hfp-dd-count {
  opacity: 0.7;
}

.hfp-dd-sector {
  border-radius: 4px;
  margin-bottom: 2px;
  font-weight: 600;
}
.hfp-dd-sector .hfp-dd-count {
  opacity: 0.7;
}

.hfp-dd-sector-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  margin-right: 4px;
  flex-shrink: 0;
  vertical-align: -3px;
}

.hfs-sort-group {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: -8px;
}
.hfs-sort-group:empty {
  display: none;
}
.browse-mode .hfs-sort-group {
  display: none;
}

.hfs-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #888;
  background: none;
  border: 1px solid #eee;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.hfs-btn:hover {
  border-color: #007bff;
  color: #007bff;
}
.hfs-btn.hfs-active {
  background: color-mix(in srgb, #007bff 10%, transparent);
  border-color: color-mix(in srgb, #007bff 40%, #ddd);
  color: #007bff;
}

.hfs-num-menu {
  position: absolute;
  z-index: 100;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 4px;
  min-width: 120px;
  margin-top: 4px;
}

.hfs-menu-item {
  display: block;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s;
}
.hfs-menu-item:hover {
  background: #f8f9fa;
}
.hfs-menu-item.hfs-menu-active {
  background: #e7f1ff;
  font-weight: 600;
}

.page-hospital .search-section {
  max-width: none;
}

.hosp-treemap-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}
.hosp-treemap-card .treemap-toggles {
  display: inline-flex;
  gap: 4px;
  margin-left: 12px;
}
.hosp-treemap-card .treemap-toggle {
  font-size: 13px;
  padding: 2px 10px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hosp-treemap-card .treemap-toggle:hover {
  border-color: #999;
  color: #333;
}
.hosp-treemap-card .treemap-toggle.active {
  background: #333;
  color: #fff;
  border-color: #333;
}
.hosp-treemap-card .treemap-dim-group {
  margin-left: 4px;
  border-left: 1px solid #ddd;
  padding-left: 8px;
}

#treemap-chart {
  padding-top: 8px;
}

.treemap-wrapper {
  overflow: hidden;
}

.treemap-group {
  position: absolute;
  border-radius: 4px;
  overflow: hidden;
}

.treemap-group-label {
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.treemap-group-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.treemap-state {
  position: absolute;
  border-radius: 3px;
  overflow: hidden;
}

.treemap-state-label {
  position: absolute;
  top: 2px;
  left: 5px;
  right: 5px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.85;
}

.treemap-state-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.treemap-leaf {
  position: absolute;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.treemap-leaf:hover {
  background: var(--leaf-hover) !important;
}

.treemap-leaf-current {
  outline: 2.5px solid #333;
  outline-offset: -1px;
  z-index: 2;
}

.treemap-leaf-label {
  color: rgba(255, 255, 255, 0.95);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 3px;
}

.treemap-leaf-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 1px 3px 2px;
  pointer-events: none;
  align-items: center;
}

.treemap-leaf-logo {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15);
}

.treemap-leaf-logo-current {
  outline: 1.5px solid #fff;
  outline-offset: -0.5px;
}

.treemap-leaf-logo-more {
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.treemap-label-count {
  margin-left: auto;
  font-weight: 600;
  opacity: 0.7;
  flex-shrink: 0;
  font-size: inherit;
}

.treemap-tooltip {
  display: none;
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 8px 10px;
  pointer-events: none;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.4;
}
.treemap-tooltip .treemap-tooltip-title {
  font-weight: 700;
  margin-bottom: 2px;
}
.treemap-tooltip .treemap-tooltip-group {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}
.treemap-tooltip .treemap-tooltip-list {
  font-size: 13px;
  color: #333;
  max-height: 160px;
  overflow-y: auto;
}
.treemap-tooltip .treemap-tooltip-list strong {
  color: #007bff;
}

.hosp-sankey-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}
.hosp-sankey-card .sankey-toggles {
  display: inline-flex;
  gap: 4px;
  margin-left: 12px;
}
.hosp-sankey-card .sankey-toggle {
  font-size: 13px;
  padding: 2px 10px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hosp-sankey-card .sankey-toggle:hover {
  border-color: #999;
  color: #333;
}
.hosp-sankey-card .sankey-toggle.active {
  background: #333;
  color: #fff;
  border-color: #333;
}
.hosp-sankey-card .sankey-dim-group {
  margin-left: 4px;
  border-left: 1px solid #ddd;
  padding-left: 8px;
}
.hosp-sankey-card .sankey-sort-group {
  margin-left: 4px;
  border-left: 1px solid #ddd;
  padding-left: 8px;
}
.hosp-sankey-card .sankey-sort {
  font-size: 13px;
  padding: 2px 8px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hosp-sankey-card .sankey-sort:hover {
  border-color: #999;
  color: #333;
}
.hosp-sankey-card .sankey-sort.active {
  background: #333;
  color: #fff;
  border-color: #333;
}
.hosp-sankey-card .sankey-link:hover {
  stroke-opacity: 0.6 !important;
}
.hosp-sankey-card .sankey-node-icon {
  pointer-events: none;
}
.hosp-sankey-card .sankey-hospital-logo {
  cursor: pointer;
}
.hosp-sankey-card .sankey-hospital-logo:hover {
  opacity: 1 !important;
}

.org-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}
@media (max-width: 600px) {
  .org-grid {
    grid-template-columns: 1fr;
  }
}

.hospital-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  grid-column: 1/-1;
  margin-left: 120px;
}
@media (max-width: 600px) {
  .hospital-mini-card {
    margin-left: 0;
  }
}
.hospital-mini-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}
.hospital-mini-card.no-link {
  cursor: default;
}
.hospital-mini-card.no-link:hover {
  border-color: #ddd;
  box-shadow: none;
  transform: none;
}

.hospital-mini-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: white;
}

.hospital-mini-details {
  flex: 1;
  min-width: 0;
}

.hospital-mini-company {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hospital-mini-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.hospital-mini-code {
  font-size: 12px;
  font-family: monospace;
  color: #666;
  background: #e9ecef;
  padding: 1px 6px;
  border-radius: 3px;
}

.hospital-mini-label {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.others-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  margin-left: 420px;
  padding: 24px;
}
@media (max-width: 800px) {
  .others-section {
    margin-left: 0;
  }
}
.others-section h2 {
  margin: 0 0 20px 0;
  font-size: 17px;
  font-weight: 400;
  color: #333;
}
.others-section .workshop-pill {
  font-size: 12px;
}

.others-master-detail {
  display: flex;
}
@media (max-width: 600px) {
  .others-master-detail {
    flex-direction: column;
    min-height: auto;
  }
}

.others-categories {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 115px;
}
@media (max-width: 600px) {
  .others-categories {
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}

.others-category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  opacity: 0.4;
}
.others-category-row:hover:not(.disabled) {
  background: #eee;
  opacity: 1;
}
.others-category-row.active {
  background: #ddd;
  opacity: 1;
}
.others-category-row.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (max-width: 600px) {
  .others-category-row {
    flex: 0 0 auto;
    padding: 6px 10px;
  }
}

.others-category-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.others-category-label {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
}

h2 .others-category-icon {
  vertical-align: middle;
}

h2 .others-category-label {
  font-size: 17px;
  margin-left: 2px;
}

.others-category-count {
  font-size: 12px;
  color: #666;
  position: absolute;
  left: -40px;
  visibility: hidden;
}

.active .others-category-count, .others-category-row:hover .others-category-count {
  visibility: visible;
}

.others-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: 450px;
  min-width: 0;
  margin-top: -46px;
}
@media (max-width: 600px) {
  .others-details {
    border-left: none;
    border-top: 1px solid #eee;
    padding-left: 0;
    padding-top: 12px;
    max-height: none;
  }
}

.others-detail-header {
  flex-shrink: 0;
  padding-bottom: 16px;
}

.others-detail-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  padding: 6px 0;
}
.others-detail-name.others-detail-link {
  text-decoration: none;
  color: inherit;
  padding: 8px;
  background: #f8f8f8;
  border-radius: 4px;
  margin-top: -10px;
}
.others-detail-name.others-detail-link:hover {
  background: #e8e8e8;
  text-decoration: none;
}

.others-hospital-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.pill-dropdown {
  position: relative;
}

.pill-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s;
}
.pill-dropdown-trigger:hover {
  border-color: #999;
}
.pill-dropdown-trigger .workshop-pill,
.pill-dropdown-trigger .project-pill,
.pill-dropdown-trigger .simple-pill,
.pill-dropdown-trigger .estado-pill,
.pill-dropdown-trigger .region-pill,
.pill-dropdown-trigger .sector-pill {
  pointer-events: none;
}
.pill-dropdown-trigger .workshop-pill:hover,
.pill-dropdown-trigger .project-pill:hover,
.pill-dropdown-trigger .simple-pill:hover,
.pill-dropdown-trigger .estado-pill:hover,
.pill-dropdown-trigger .region-pill:hover,
.pill-dropdown-trigger .sector-pill:hover {
  transform: none;
  box-shadow: none;
}

.pill-dropdown-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #666;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.pill-dropdown.open .pill-dropdown-arrow {
  transform: rotate(180deg);
}

.pill-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}

.pill-dropdown.open .pill-dropdown-menu {
  display: block;
}

.pill-dropdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 6px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
}
.pill-dropdown-item:hover {
  background: #f8f9fa;
}
.pill-dropdown-item.active {
  background: #e7f1ff;
}
.pill-dropdown-item.disabled {
  opacity: 0.35;
  cursor: default;
}
.pill-dropdown-item.disabled:hover {
  background: none;
}
.pill-dropdown-item .workshop-pill,
.pill-dropdown-item .project-pill,
.pill-dropdown-item .simple-pill,
.pill-dropdown-item .estado-pill,
.pill-dropdown-item .region-pill,
.pill-dropdown-item .sector-pill {
  pointer-events: none;
}
.pill-dropdown-item .workshop-pill:hover,
.pill-dropdown-item .project-pill:hover,
.pill-dropdown-item .simple-pill:hover,
.pill-dropdown-item .estado-pill:hover,
.pill-dropdown-item .region-pill:hover,
.pill-dropdown-item .sector-pill:hover {
  transform: none;
  box-shadow: none;
}

.pill-dropdown-count {
  font-size: 11px;
  color: #666;
  flex-shrink: 0;
}

.others-pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.others-pill-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s;
}
.others-pill-option:hover:not(.disabled) {
  opacity: 0.75;
}
.others-pill-option.active {
  opacity: 1;
}
.others-pill-option.disabled {
  opacity: 0.2;
  cursor: default;
}
.others-pill-option .others-pill-count {
  font-size: 11px;
  color: #999;
  font-weight: 500;
}
.others-pill-option .workshop-pill,
.others-pill-option .project-pill,
.others-pill-option .simple-pill,
.others-pill-option .estado-pill,
.others-pill-option .region-pill,
.others-pill-option .sector-pill {
  pointer-events: none;
}

.others-detail-list {
  flex: 1;
  overflow-y: auto;
  padding-left: 16px;
  border: 1px solid #ccc;
  border-width: 0 0 0 1px;
}

.others-loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

.others-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
}
.others-person:last-child {
  border-bottom: none;
}
.others-person:hover {
  background: #f8f9fa;
}
.others-person img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.others-person-name {
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.others-person.has-role {
  align-items: flex-start;
}
.others-person.has-role .others-person-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.others-person.has-role.is-self {
  opacity: 0.45;
  cursor: default;
}
.others-person.has-role.is-self:hover {
  transform: none;
  box-shadow: none;
}

.others-person-role {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.others-person-role .lp-org-badge {
  font-weight: 600;
  letter-spacing: 0.3px;
}

.others-empty {
  color: #999;
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.page-collaborator .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
@media (max-width: 600px) {
  .page-collaborator .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 0;
  }
}
.page-collaborator .logo-link {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .page-collaborator .logo-link {
    display: none;
  }
}
.page-collaborator .mas-logo {
  height: 40px;
  width: auto;
}
.page-collaborator .search-section {
  flex: 0 1 600px;
}
@media (max-width: 700px) {
  .page-collaborator .search-section {
    width: 100%;
    flex: 1;
  }
}
.page-collaborator .filter-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.page-collaborator .logo-link-mobile {
  display: none;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .page-collaborator .logo-link-mobile {
    display: block;
  }
}
.page-collaborator .mas-logo-mobile {
  height: 32px;
  width: auto;
}
.page-collaborator .nav-arrow-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 20px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}
.page-collaborator .nav-arrow-header:hover {
  background: #f8f9fa;
  color: #007bff;
  border-color: #007bff;
}
.page-collaborator .nav-arrow-header.nav-active {
  background: rgba(0, 123, 255, 0.15);
  border-color: #ddd;
  transform: scale(1.1);
}
@media (max-width: 700px) {
  .page-collaborator .nav-arrow-header {
    display: none;
  }
}
.page-collaborator .filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
  padding: 4px 0;
  cursor: pointer;
  flex: 1;
  position: relative;
}
@media (max-width: 700px) {
  .page-collaborator .filter-bar {
    display: block;
    text-align: center;
    padding-right: 50px;
  }
}
.page-collaborator .filter-toggle-arrow {
  display: inline-block;
  font-size: 13px;
  transition: transform 0.2s ease;
  color: #666;
}
.page-collaborator .filter-toggle-arrow.open {
  transform: rotate(90deg);
}
.page-collaborator .filter-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  vertical-align: middle;
}
.page-collaborator .filter-text {
  display: inline;
}
.page-collaborator .filter-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}
.page-collaborator .filter-link:hover {
  text-decoration: underline;
}
.page-collaborator #filter-count {
  font-weight: 600;
  color: #fff;
  background: #000;
  border-radius: 3px;
  padding: 2px 5px;
}
.page-collaborator .filter-description {
  display: inline;
}
.page-collaborator .filter-inline-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 2px;
}
.page-collaborator .filter-inline-logo {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 2px;
  border-radius: 2px;
}
.page-collaborator .filter-inline-logo.hcode-label {
  display: inline-flex;
}
.page-collaborator .filter-clear-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #007bff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  visibility: hidden;
}
.page-collaborator .filter-clear-btn.visible {
  visibility: visible;
}
.page-collaborator .filter-clear-btn:hover {
  text-decoration: underline;
}
@media (max-width: 700px) {
  .page-collaborator .filter-clear-btn {
    position: absolute;
    top: 0;
    right: 0;
    margin-left: 0;
  }
}
.page-collaborator .filter-value {
  font-weight: 600;
  color: #333;
}
.page-collaborator .filter-exclusion {
  color: #dc3545;
}
.page-collaborator .filter-value-excluded {
  font-weight: 600;
  color: #dc3545;
}
.page-collaborator .filter-panel-wrapper {
  position: relative;
  margin-bottom: 12px;
  text-align: center;
}
.page-collaborator .filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid #999;
}
.page-collaborator .filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.page-collaborator .filter-pill-included {
  background: rgba(0, 123, 255, 0.15);
  color: rgb(0, 73.8, 153);
}
.page-collaborator .filter-pill-included:hover {
  background: rgb(0, 98.4, 204);
  color: white;
}
.page-collaborator .filter-pill-excluded {
  background: rgba(220, 53, 69, 0.15);
  color: #c41e3a;
}
.page-collaborator .filter-pill-excluded:hover {
  background: #c41e3a;
  color: white;
}
.page-collaborator .filter-pill-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 2px;
}
.page-collaborator .filter-pill-count {
  font-size: 11px;
  opacity: 0.7;
}
.page-collaborator .filter-pill-category-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
  margin-left: 4px;
}
.page-collaborator .filter-pill-category-icon:first-child {
  margin-left: 0;
}
.page-collaborator .filter-pill-category-icon:hover {
  opacity: 1;
}
.page-collaborator .filter-panel {
  display: flex;
  height: 200px;
  background: transparent;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}
@media (max-width: 600px) {
  .page-collaborator .filter-panel {
    flex-direction: column;
    max-height: none;
  }
}
.page-collaborator .search-section {
  max-width: 600px;
}
.page-collaborator .filter-master {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  border-right: 1px solid #999;
  overflow-y: auto;
}
@media (max-width: 600px) {
  .page-collaborator .filter-master {
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px;
    border-right: none;
  }
}
.page-collaborator .filter-category-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.page-collaborator .filter-category-row:hover {
  background: #ddd;
}
.page-collaborator .filter-category-row.active {
  background: #ccc;
}
.page-collaborator .filter-category-row.active .filter-category-total {
  opacity: 1;
}
.page-collaborator .filter-category-row:hover .filter-grouping-toggle {
  opacity: 1;
}
@media (max-width: 600px) {
  .page-collaborator .filter-category-row {
    flex: 0 0 auto;
    padding: 6px 10px;
  }
}
.page-collaborator .filter-grouping-toggle {
  font-size: 14px;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.page-collaborator .filter-grouping-toggle.grouping-active {
  opacity: 1;
}
@media (pointer: coarse) {
  .page-collaborator .filter-grouping-toggle {
    opacity: 1;
  }
}
.page-collaborator .filter-category-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}
.page-collaborator .filter-category-label {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-collaborator .filter-category-badge {
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: #007bff;
  padding: 1px 6px;
  border-radius: 10px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.page-collaborator .filter-category-badge.badge-excluded {
  background: #dc3545;
}
.page-collaborator .filter-category-row:hover .filter-category-badge {
  opacity: 1;
}
.page-collaborator .filter-category-total {
  font-size: 11px;
  color: #666;
  flex-shrink: 0;
  opacity: 0.5;
}
.page-collaborator .filter-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 5px;
}
@media (max-width: 600px) {
  .page-collaborator .filter-detail {
    border-top: 1px solid #eee;
  }
}
.page-collaborator .filter-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.page-collaborator .filter-detail-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #333;
}
.page-collaborator .filter-detail-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.page-collaborator .filter-detail-empty {
  color: #666;
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}
.page-collaborator .filter-detail-separator {
  border-top: 1px solid #0b52a0;
  margin: 4px 0;
}
.page-collaborator .filter-abc-toggle {
  background: none;
  border: none;
  color: #aaa;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 3px;
  border-radius: 3px;
  transition: all 0.15s;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1;
  opacity: 0;
  flex-shrink: 0;
}
.page-collaborator .filter-abc-toggle:hover {
  color: #007bff;
  background: rgba(0, 123, 255, 0.1);
}
.page-collaborator .filter-abc-toggle.active {
  opacity: 1;
  color: #007bff;
  background: rgba(0, 123, 255, 0.15);
}
.page-collaborator .filter-category-row:hover .filter-abc-toggle {
  opacity: 1;
}
.page-collaborator .filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
  transition: background-color 0.1s;
  user-select: none;
}
.page-collaborator .filter-checkbox:hover {
  background: #e7f1ff;
}
.page-collaborator .filter-checkbox:hover .filter-checkbox-count {
  opacity: 1;
}
.page-collaborator .filter-checkbox:hover .filter-bar {
  background: rgba(0, 123, 255, 0.35);
}
.page-collaborator .filter-checkbox.checked {
  background: rgba(0, 123, 255, 0.06);
}
.page-collaborator .filter-checkbox.checked:hover {
  background: rgba(0, 123, 255, 0.08);
}
.page-collaborator .filter-checkbox.checked:hover .filter-bar {
  background: rgba(90, 170, 255, 0.4);
}
.page-collaborator .filter-checkbox.checked .filter-checkbox-count {
  opacity: 1;
  background: rgba(0, 123, 255, 0.15);
}
.page-collaborator .filter-checkbox.checked .filter-bar {
  background: rgba(90, 170, 255, 0.3);
}
.page-collaborator .filter-checkbox.excluded {
  background: rgba(220, 53, 69, 0.05);
}
.page-collaborator .filter-checkbox.excluded:hover {
  background: rgba(220, 53, 69, 0.08);
}
.page-collaborator .filter-checkbox.excluded:hover .filter-bar {
  background: rgba(220, 53, 69, 0.3);
}
.page-collaborator .filter-checkbox.excluded .filter-checkbox-count {
  display: none;
}
.page-collaborator .filter-checkbox.excluded .filter-not-pill {
  opacity: 1;
  background: #dc3545;
  color: white;
}
.page-collaborator .filter-checkbox.excluded .filter-bar {
  background: rgba(220, 53, 69, 0.2);
}
.page-collaborator .filter-checkbox.disabled {
  display: none;
}
.page-collaborator .filter-checkbox.disabled.checked, .page-collaborator .filter-checkbox.disabled.excluded {
  display: flex;
  opacity: 0.7;
  cursor: default;
  background: transparent;
}
.page-collaborator .filter-checkbox.disabled.checked:hover, .page-collaborator .filter-checkbox.disabled.excluded:hover {
  background: transparent;
}
.page-collaborator .filter-checkbox.disabled.checked .filter-checkbox-label, .page-collaborator .filter-checkbox.disabled.excluded .filter-checkbox-label {
  color: #666;
}
.page-collaborator .filter-checkbox.disabled.checked .filter-checkbox-count, .page-collaborator .filter-checkbox.disabled.excluded .filter-checkbox-count {
  opacity: 1;
  color: #666;
  background: rgba(100, 100, 100, 0.12);
}
.page-collaborator .filter-checkbox.disabled.checked.excluded .filter-not-pill, .page-collaborator .filter-checkbox.disabled.excluded.excluded .filter-not-pill {
  background: #888;
}
.page-collaborator .filter-checkbox.disabled.checked .filter-bar, .page-collaborator .filter-checkbox.disabled.excluded .filter-bar {
  background: rgba(100, 100, 100, 0.2);
}
.page-collaborator .filter-checkbox .filter-bar-track {
  flex-shrink: 0;
  width: 30%;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.page-collaborator .filter-checkbox .filter-bar {
  height: 100%;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 3px;
  transition: width 0.2s ease, background 0.15s;
}
.page-collaborator .filter-checkbox .filter-checkbox-label {
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.page-collaborator .filter-checkbox .filter-checkbox-count {
  font-size: 11px;
  color: #888;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 3px;
  background: #f0f4f8;
}
.page-collaborator .filter-checkbox .filter-not-pill {
  font-size: 9px;
  font-weight: 600;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.15);
  padding: 2px 5px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s;
  cursor: pointer;
  flex-shrink: 0;
}
.page-collaborator .filter-checkbox:hover .filter-not-pill {
  opacity: 0.5;
}
.page-collaborator .filter-checkbox:hover .filter-not-pill:hover {
  opacity: 1;
  background: #dc3545;
  color: white;
}
.page-collaborator .filter-estado-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}
.page-collaborator .filter-pill-estado-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 2px;
}
.page-collaborator .filter-region-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}
.page-collaborator .filter-pill-region-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 2px;
}
.page-collaborator .filter-hospital-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}
.page-collaborator .filter-sector-icon {
  height: 24px;
  width: 52px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
  padding: 2px 4px;
}
.page-collaborator .filter-pill-sector-icon {
  height: 14px;
  width: auto;
  object-fit: contain;
}
.page-collaborator .filter-sector-acronym {
  width: 52px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
}
.page-collaborator .filter-pill-sector-acronym {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}
.page-collaborator .search-container {
  margin: 0;
  position: relative;
}
.page-collaborator .search-icon {
  width: 14px;
  height: 14px;
  left: 44px;
}
.page-collaborator #search {
  text-align: left;
  padding-left: 63px;
}
.page-collaborator #search::placeholder {
  text-align: left;
}
@media (max-width: 700px) {
  .page-collaborator #search {
    text-align: center;
  }
  .page-collaborator #search::placeholder {
    text-align: center;
  }
}
@media (min-width: 701px) {
  .page-collaborator .profile-pid .nav-arrow {
    display: none;
  }
}

.collaborator-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.nav-arrow {
  flex-shrink: 0;
  border: 0;
  font-size: 24px;
  color: #666;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.nav-arrow:hover:not(:disabled) {
  background: #f8f9fa;
  color: #007bff;
  border-color: #007bff;
}
.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
@media (max-width: 700px) {
  .nav-arrow {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

#collaborator-content {
  flex: 1;
  min-width: 0;
}

#collaborator-content {
  overflow: hidden;
  position: relative;
}

.carousel-container {
  position: relative;
  display: flex;
  gap: 40px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-container .profile-card {
  flex-shrink: 0;
  width: 100%;
}

.carousel-container.start-right {
  transform: translateX(calc(-100% - 40px));
}

.carousel-container.sliding-left {
  transform: translateX(calc(-100% - 40px));
}

.carousel-container.sliding-right {
  transform: translateX(0);
}

#browse-list-container {
  display: none;
  margin-top: 10px;
  border: 1px solid #ddd;
}

.page-collaborator.list-mode #browse-list-container {
  display: block;
}
.page-collaborator.list-mode .collaborator-wrapper {
  display: none;
}
.page-collaborator.list-mode .nav-arrow-header {
  opacity: 0;
  pointer-events: none;
}
.page-collaborator.list-mode .search-container {
  margin-bottom: 0;
}
.page-collaborator.list-mode .autocomplete-dropdown {
  display: none !important;
}

.page-collaborator.profile-mode #browse-list-container {
  display: none;
}
.page-collaborator.profile-mode .collaborator-wrapper {
  display: block;
}
.page-collaborator.profile-mode #grouping-controls {
  display: none !important;
}

.browse-list {
  background: white;
  border-radius: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 200px);
}
.browse-list .browse-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  padding-right: 52px;
  position: relative;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.1s;
}
.browse-list .browse-item:last-child {
  border-bottom: none;
}
.browse-list .browse-item:hover {
  background: #f8f9fa;
}
.browse-list .browse-item.selected {
  background: #e7f1ff;
}
.browse-list .browse-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.browse-list .browse-item .info {
  flex: 1;
  min-width: 0;
}
.browse-list .browse-item .name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browse-list .browse-item .company {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browse-list .browse-item .pid-label {
  color: #888;
  font-size: 11px;
  font-family: monospace;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
  margin-left: auto;
}
.browse-list .browse-item:hover .pid-label {
  opacity: 1;
}
.browse-list .browse-item.show-pid .pid-label {
  opacity: 1;
}
.browse-list .browse-item .org-logo {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.browse-list .browse-item:hover .org-logo {
  opacity: 1;
}
.browse-list .browse-loading {
  text-align: center;
  padding: 12px;
  color: #666;
  font-size: 13px;
}
.browse-list .browse-group .group-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #f5f5f5;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #eee;
  transition: background 0.1s;
}
.browse-list .browse-group .group-header:hover {
  background: #ebebeb;
}
.browse-list .browse-group .group-toggle {
  width: 16px;
  font-size: 10px;
  color: #666;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.browse-list .browse-group .group-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
  margin-right: 6px;
}
.browse-list .browse-group .group-label {
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browse-list .browse-group .group-count {
  color: #666;
  font-size: 12px;
  margin-left: 6px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.browse-list .browse-group .group-header:hover .group-count {
  opacity: 1;
}
.browse-list .browse-group.collapsed .group-content {
  display: none;
}
.browse-list .browse-group.level-0 > .group-header {
  background: #f0f0f0;
  font-size: 14px;
}
.browse-list .browse-group.level-1 > .group-header {
  background: #f7f7f7;
  padding-left: 24px;
  font-size: 13px;
}
.browse-list .browse-group.level-1 > .group-content > .browse-item {
  padding-left: 36px;
}
.browse-list .browse-group.level-2 > .group-header {
  background: #fafafa;
  padding-left: 48px;
  font-size: 13px;
}
.browse-list .browse-group.level-2 > .group-content > .browse-item {
  padding-left: 60px;
}
.browse-list .browse-group.level-3 > .group-header {
  background: #fcfcfc;
  padding-left: 72px;
  font-size: 12px;
}
.browse-list .browse-group.level-3 > .group-content > .browse-item {
  padding-left: 84px;
}
.browse-list .browse-group.level-4 > .group-header {
  background: #fff;
  padding-left: 96px;
  font-size: 12px;
}
.browse-list .browse-group.level-4 > .group-content > .browse-item {
  padding-left: 108px;
}
.browse-list .browse-group.rest-group > .group-header {
  font-style: italic;
}
.browse-list .browse-group.rest-group > .group-header .group-label {
  color: #666;
}
.browse-list .group-level-controls {
  display: none;
  margin-left: 8px;
  gap: 2px;
}
.group-header:hover .browse-list .group-level-controls {
  display: flex;
}
.browse-list .group-level-controls button {
  padding: 2px 6px;
  font-size: 12px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  border-radius: 3px;
  transition: all 0.1s;
}
.browse-list .group-level-controls button:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}
.browse-list .browse-group .group-header {
  position: sticky;
  z-index: 10;
  min-height: 37px;
  box-sizing: border-box;
}
.browse-list .browse-group.level-0 > .group-header {
  top: 0;
  z-index: 15;
}
.browse-list .browse-group.level-1 > .group-header {
  top: 37px;
  z-index: 14;
}
.browse-list .browse-group.level-2 > .group-header {
  top: 74px;
  z-index: 13;
}
.browse-list .browse-group.level-3 > .group-header {
  top: 111px;
  z-index: 12;
}
.browse-list .browse-group.level-4 > .group-header {
  top: 148px;
  z-index: 11;
}

.grouping-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  margin-top: 8px;
  font-size: 12px;
}
.grouping-controls .grouping-level {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s;
}
.grouping-controls .grouping-level:hover {
  background: #f0f0f0;
  border-color: #ccc;
}
.grouping-controls .grouping-level .level-toggle {
  font-size: 10px;
  width: 12px;
  text-align: center;
}
.grouping-controls .grouping-level .level-label {
  font-weight: 500;
  color: #333;
}
.grouping-controls .grouping-level .level-abc, .grouping-controls .grouping-level .level-remove {
  font-size: 8px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s, color 0.1s;
  min-width: 20px;
  text-align: center;
}
.grouping-controls .grouping-level:hover .level-abc, .grouping-controls .grouping-level:hover .level-remove {
  opacity: 0.5;
}
.grouping-controls .grouping-level .level-abc {
  color: #666;
  background: transparent;
}
.grouping-controls .grouping-level .level-abc:hover {
  opacity: 1 !important;
  color: #007bff;
  background: rgba(0, 123, 255, 0.1);
}
.grouping-controls .grouping-level .level-abc.active {
  opacity: 1 !important;
  color: #007bff;
  background: rgba(0, 123, 255, 0.15);
}
.grouping-controls .grouping-level .level-remove {
  color: #999;
  font-size: 14px;
  font-weight: 400;
  min-width: 16px;
}
.grouping-controls .grouping-level .level-remove:hover {
  opacity: 1 !important;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}
.grouping-controls .grouping-level.state-expanded .level-toggle {
  color: #333;
}
.grouping-controls .grouping-level.state-collapsed .level-toggle {
  color: #333;
}
.grouping-controls .grouping-level.state-mixed .level-toggle {
  color: #ccc;
}
.grouping-controls .grouping-clear-btn {
  background: none;
  border: none;
  color: #007bff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: auto;
}
.grouping-controls .grouping-clear-btn:hover {
  text-decoration: underline;
}

.page-collaborator .search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  transition: all 0.15s;
}
.page-collaborator .search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}
.page-collaborator .search-clear-btn.visible {
  display: flex;
}

.profile-close-pid {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 14px;
  color: #666;
  transition: all 0.2s;
  z-index: 10;
  min-width: 32px;
  text-align: center;
}
.profile-close-pid .close-icon {
  display: inline;
}
.profile-close-pid .pid-value {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 8px;
  font-family: monospace;
  font-size: 12px;
  color: #666;
  background: rgba(0, 0, 0, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.profile-close-pid:hover {
  background: rgba(0, 0, 0, 0.15);
  color: #333;
}
.profile-close-pid:hover .pid-value {
  opacity: 1;
}
@media (max-width: 600px) {
  .profile-close-pid {
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  .profile-close-pid .pid-value {
    display: none;
  }
}

.page-collaborator .profile-card {
  position: relative;
}

.page-collaborator.expanding-to-profile #browse-list-container {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-collaborator.expanding-to-profile .collaborator-wrapper {
  animation: expand-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-collaborator.dismissing-to-list .collaborator-wrapper {
  animation: dismiss-out 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.page-collaborator.dismissing-to-list #browse-list-container {
  animation: list-fade-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes expand-in {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes dismiss-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
}
@keyframes list-fade-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.map-page {
  padding-top: 10px;
}

.map-header {
  position: relative;
  margin-bottom: 10px;
}
.map-header .logo-group {
  position: absolute;
  left: 0;
  top: 0;
  flex-direction: row;
  gap: 6px;
}
.map-header .page-nav {
  margin-top: 0;
  align-self: center;
  padding-right: 14px;
  border-right: 1px solid #ddd;
}
.map-header .page-nav-icon img {
  height: 28px;
}
.map-header .logo-link {
  flex-shrink: 0;
}
.map-header .mas-logo {
  height: 40px;
  width: auto;
  display: block;
}
.map-header h2 {
  margin: 0 0 6px 0;
  color: #333;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}
.map-header .subtitle {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.map-controls-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.map-breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-height: 25px;
  flex: 1;
  font-size: 11px;
}

.map-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.map-breadcrumb:empty {
  min-height: 0;
}
@media (max-width: 1000px) {
  .map-breadcrumb {
    margin-right: 0;
  }
}
.map-breadcrumb .bc-label {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}
.map-breadcrumb .bc-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}
.map-breadcrumb .bc-btn {
  height: 25px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  white-space: nowrap;
}
.map-breadcrumb .bc-btn:hover {
  border-color: #999;
  color: #000;
}
.map-breadcrumb .bc-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
  cursor: pointer;
}
.map-breadcrumb .bc-btn.active:hover {
  opacity: 0.85;
}
.map-breadcrumb .bc-volver-label {
  font-size: 11px;
  color: #999;
  font-style: italic;
  white-space: nowrap;
}

.map-tile-toggle {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.map-tile-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tile-toggle-label {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

.tile-toggle-btn {
  padding: 0 10px;
  height: 25px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.tile-toggle-btn + .tile-toggle-btn {
  border-left: 1px solid #ddd;
}
.tile-toggle-btn:hover:not(.active) {
  background: #f8f9fa;
  color: #333;
}
.tile-toggle-btn.active {
  background: #666;
  color: #fff;
}

.map-view-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 384px;
  flex-shrink: 0;
}
.map-view-toggle .map-toggle-pill {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.map-toggle-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.map-toggle-btn + .map-toggle-btn {
  border-left: 1px solid #ddd;
}
.map-toggle-btn:hover:not(.active) {
  background: #f8f9fa;
  color: #333;
}
.map-toggle-btn.active {
  background: #007bff;
  color: #fff;
}
.map-toggle-btn.map-toggle-dim:not(.active) {
  opacity: 0.5;
}

.map-container {
  display: flex;
  gap: 20px;
  height: calc(100vh - 140px);
  min-height: 500px;
  user-select: none;
}
@media (max-width: 1000px) {
  .map-container {
    flex-direction: column;
    height: auto;
  }
}

.map-main {
  flex: 1;
  position: relative;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.map-main #mexico-map {
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: transparent;
  z-index: 0;
}
.map-main .leaflet-tile-pane {
  filter: grayscale(1);
}
.map-main .leaflet-overlay-pane {
  mix-blend-mode: multiply;
}
.map-main.tiles-off .leaflet-overlay-pane {
  mix-blend-mode: normal;
}

.map-inset {
  position: absolute;
  top: 0;
  right: 0;
  width: min(38%, 360px);
  height: min(50%, 340px);
  min-width: 200px;
  min-height: 180px;
  background: white;
  isolation: isolate;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid #ddd;
  overflow: visible;
  z-index: 10;
}
.map-inset .leaflet-tile-pane {
  filter: grayscale(1);
}
.map-inset .leaflet-overlay-pane {
  mix-blend-mode: multiply;
}
.map-inset.tiles-off .leaflet-overlay-pane {
  mix-blend-mode: normal;
}
@media (max-width: 700px) {
  .map-inset {
    width: 40%;
    height: 35%;
    min-width: 150px;
    min-height: 120px;
    top: 10px;
    right: 10px;
  }
}

.inset-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-align: center;
  z-index: 5;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.inset-label:hover {
  color: #333;
  background: rgb(255, 255, 255);
}

#mexico-inset {
  width: 100%;
  height: 100%;
  background: transparent;
}

.map-container .leaflet-control-attribution {
  display: block;
  background: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.leaflet-interactive {
  cursor: pointer;
}
.leaflet-interactive:focus {
  outline: none;
}

.map-legend {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  line-height: 1.4;
}
.map-legend .map-legend-title {
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
  font-size: 11px;
}
.map-legend .map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-legend .map-legend-item.map-legend-region {
  padding: 1px 4px;
  border-radius: 3px;
  transition: background 0.15s;
}
.map-legend .map-legend-item.map-legend-region:hover {
  background: rgba(0, 0, 0, 0.08);
}
.map-legend .map-legend-swatch {
  display: inline-block;
  width: 16px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.map-tooltip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.map-tooltip .tooltip-sector {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 1px 6px 1px 3px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.map-tooltip .tooltip-sector img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.map-connector-line {
  stroke: rgba(0, 0, 0, 0.25);
  stroke-width: 1;
}
.map-connector-line.unfocused {
  opacity: 0.55;
}

.map-connector-dot {
  fill: rgba(0, 0, 0, 0.35);
}
.map-connector-dot.unfocused {
  opacity: 0.55;
}

.map-logos-overlay {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  z-index: 500;
}

.map-hospital-logo {
  position: absolute;
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, width 0.35s ease-out, height 0.35s ease-out, border-radius 0.35s ease-out;
}
.map-hospital-logo:hover {
  transform: translate(-50%, -50%) scale(2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 100;
}
.map-hospital-logo.zoomed {
  width: 44px;
  height: 44px;
  border-radius: 6px;
}
.map-hospital-logo.zoomed:hover {
  transform: translate(-50%, -50%) scale(1.8);
}
.map-hospital-logo.logo-hover {
  transform: translate(-50%, -50%) scale(2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 100;
}
.map-hospital-logo.logo-hover.zoomed {
  transform: translate(-50%, -50%) scale(1.8);
}
.map-hospital-logo.unfocused {
  opacity: 0.6;
}
.map-hospital-logo.unfocused:hover, .map-hospital-logo.unfocused.logo-hover {
  opacity: 1;
}
.map-hospital-logo.hcode-label {
  padding: 0 3px;
}
.map-hospital-logo.hcode-label.zoomed {
  padding: 0 5px;
}

.map-cluster {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  height: var(--logo-size);
}
.map-cluster.unfocused {
  opacity: 0.6;
}
.map-cluster.cluster-hover {
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 100;
  transition: transform 0.15s ease-out;
}
.map-cluster .cluster-logo {
  position: absolute;
  top: 0;
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.map-cluster .cluster-logo.unfocused {
  opacity: 0.6;
}
.map-cluster .cluster-count {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #555;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 1px 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
  white-space: nowrap;
}

.map-inset .map-hospital-logo {
  width: 20px;
  height: 20px;
}
.map-inset .map-hospital-logo:hover {
  transform: translate(-50%, -50%) scale(2.2);
}

.map-sidebar {
  width: 384px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
@media (max-width: 1000px) {
  .map-sidebar {
    width: 100%;
    max-height: 400px;
  }
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 0;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
}
.sidebar-header .back-to-states {
  display: none;
  font-size: 12px;
  color: #007bff;
  text-decoration: none;
  margin-bottom: 4px;
}
.sidebar-header .back-to-states:hover {
  text-decoration: underline;
}
.sidebar-header .back-to-states.visible {
  display: block;
}
.sidebar-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}
.sidebar-header .hospital-count {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  text-align: right;
  padding: 4px 0 6px;
}
.sidebar-header .sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sidebar-sort-toggle {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}
.sidebar-sort-toggle .sort-btn {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sidebar-sort-toggle .sort-btn + .sort-btn {
  border-left: 1px solid #ddd;
}
.sidebar-sort-toggle .sort-btn:hover:not(.active) {
  background: #f8f9fa;
  color: #333;
}
.sidebar-sort-toggle .sort-btn.active {
  background: #007bff;
  color: #fff;
}

.hospital-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.hospital-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}
.hospital-item:last-child {
  border-bottom: none;
}
.hospital-item:hover, .hospital-item.map-hover {
  background: #f8f9fa;
}
.hospital-item .hospital-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: #f8f8f8;
}
.hospital-item .hospital-info {
  flex: 1;
  min-width: 0;
}
.hospital-item .hospital-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hospital-item .hospital-city {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hospital-item .hospital-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.hospital-item .hospital-code {
  font-size: 12px;
  color: #888;
  font-family: monospace;
}
.hospital-item .tooltip-sector {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 1px 6px 1px 3px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.hospital-item .tooltip-sector img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}
.empty-state.error {
  color: #dc3545;
}

.state-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}
.state-item:last-child {
  border-bottom: none;
}
.state-item:hover, .state-item.map-hover {
  background: #f8f9fa;
}
.state-item .state-escudo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.state-item .state-info {
  flex: 1;
  min-width: 0;
}
.state-item .state-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
.state-item .state-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--region-text, #c41e3a);
  background: var(--region-bg, #fee8c8);
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.state-section {
  border-bottom: 1px solid #eee;
}
.state-section:last-child {
  border-bottom: none;
}
.state-section .state-item-header {
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: none;
  gap: 0;
}
.state-section .state-item-select {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 10px 0 10px 16px;
  cursor: pointer;
}
.state-section .state-item-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 10px 8px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 0 8px 8px 0;
  transition: background 0.15s;
}
.state-section .state-item-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}
.state-section .state-item-chevron {
  font-size: 18px;
  color: #666;
  transition: transform 0.15s;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.state-section .state-hospitals {
  display: none;
  background: #fafafa;
  border-top: 1px solid #eee;
}
.state-section .state-hospitals .hospital-item {
  padding-left: 32px;
  position: relative;
}
.state-section .state-hospitals .hospital-item::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  width: 12px;
  height: 50%;
  border-left: 1.5px solid var(--region-text, #ccc);
  border-bottom: 1.5px solid var(--region-text, #ccc);
  border-bottom-left-radius: 0;
}
.state-section .state-hospitals .hospital-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  bottom: 0;
  border-left: 1.5px solid var(--region-text, #ccc);
}
.state-section:hover > .state-item-header, .state-section.map-hover > .state-item-header {
  background: var(--region-bg, #f8f9fa);
}
.state-section.expanded .state-item-chevron {
  transform: rotate(90deg);
}
.state-section.expanded .state-hospitals {
  display: block;
}
.state-section.expanded > .state-item-header::after {
  display: none;
}
.state-section.state-active > .state-item-header {
  background: var(--region-bg, #f8f9fa);
}

.region-item {
  border-bottom: 1px solid #eee;
}
.region-item:last-child {
  border-bottom: none;
}
.region-item .region-item-header {
  display: flex;
  align-items: center;
  padding: 0;
  transition: background 0.15s;
}
.region-item .region-item-select {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 10px 0 10px 16px;
  cursor: pointer;
}
.region-item .region-item-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 10px 8px;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: background 0.15s;
  min-width: 72px;
  flex-shrink: 0;
}
.region-item .region-item-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}
.region-item:hover > .region-item-header, .region-item.map-hover > .region-item-header {
  background: #eee;
}
.region-item.map-hover .region-item-name {
  font-weight: 700;
}
.region-item .region-item-bar {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  background: var(--region-text);
  flex-shrink: 0;
}
.region-item .region-item-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}
.region-item .region-item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  transition: font-weight 0.15s;
}
.region-item .region-item-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--region-text);
  background: var(--region-bg);
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 28px;
  text-align: center;
}
.region-item .region-item-chevron {
  font-size: 18px;
  color: #666;
  transition: transform 0.15s;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.region-item .region-states {
  display: none;
  background: #fafafa;
  border-top: 1px solid #eee;
}
.region-item .region-states:has(.featured) {
  display: block;
}
.region-item .region-states .state-section:not(.featured) {
  display: none;
}
.region-item .region-states .state-section {
  position: relative;
}
.region-item .region-states .state-section.featured > .state-item-header::before {
  border-left-style: dashed;
  border-bottom-style: dashed;
}
.region-item .region-states .state-section.featured > .state-item-header::after {
  display: none;
}
.region-item .region-states .state-item-header {
  padding-left: 36px;
  position: relative;
}
.region-item .region-states .state-item-header::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  width: 12px;
  height: 50%;
  border-left: 1.5px solid var(--region-text, #ccc);
  border-bottom: 1.5px solid var(--region-text, #ccc);
  border-bottom-left-radius: 0;
}
.region-item .region-states .state-section:not(:last-child) > .state-item-header::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  bottom: 0;
  border-left: 1.5px solid var(--region-text, #ccc);
}
.region-item .region-states .state-section.state-active > .state-item-header {
  background: var(--region-bg, #f0f0f0);
}
.region-item .region-states .state-section.state-active > .state-item-header .state-name {
  font-weight: 700;
}
.region-item .region-states .state-section.expanded > .state-item-header::after {
  display: none;
}
.region-item .region-states .state-hospitals .hospital-item {
  padding-left: 48px;
}
.region-item .region-states .state-hospitals .hospital-item::before {
  left: 36px;
}
.region-item .region-states .state-hospitals .hospital-item:not(:last-child)::after {
  left: 36px;
}
.region-item.expanded .region-item-chevron {
  transform: rotate(90deg);
}
.region-item.expanded .region-states {
  display: block;
}
.region-item.expanded .region-states .state-section:not(.featured) {
  display: block;
}
.region-item.expanded .region-states .state-section.featured:not(:last-child) > .state-item-header::before {
  border-left-style: solid;
  border-bottom-style: solid;
}
.region-item.expanded .region-states .state-section.featured:not(:last-child) > .state-item-header::after {
  display: block;
  border-left-style: solid;
}
.region-item.expanded .region-states .state-section.featured:last-child > .state-item-header::before {
  border-left-style: solid;
  border-bottom-style: solid;
}
.region-item.region-active {
  background: #f0f0f0;
}
.region-item.region-active > .region-item-header {
  background: var(--region-bg);
}
.region-item.region-active .region-item-name {
  font-weight: 700;
}
.region-item.region-active .region-item-bar {
  width: 6px;
}

.state-item:hover, .state-item.map-hover {
  background: #eee;
}
.state-item.map-hover .state-name {
  font-weight: 700;
}

.map-legend .map-legend-region.legend-active {
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
}

.listing {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.listing h2 {
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

.table-container {
  max-height: calc(100vh - 120px);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 10;
}

th {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  white-space: nowrap;
}

.header-row th {
  cursor: pointer;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: max-width 0.2s ease;
}
.header-row th:hover {
  max-width: none;
  background: #e8e8e8;
}
.header-row th.sticky-col, .header-row th.sticky-col-logo, .header-row th.sticky-col-hcode, .header-row th.sticky-col-filter {
  max-width: none;
  overflow: visible;
}

td {
  padding: 6px;
  border-bottom: 1px solid #eee;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

tr {
  height: 38px;
}
tr:hover td {
  background: #f0f7ff;
}
tr:nth-child(even) td {
  background: #fafafa;
}

td, th {
  vertical-align: middle;
}

.hospital-logo {
  width: 35px;
  height: 35px;
  object-fit: contain;
  border-radius: 4px;
}

.falsy-value {
  color: #ccc;
}

.count {
  color: #666;
  font-weight: normal;
  font-size: 14px;
}

.no-results {
  color: #999;
  padding: 20px;
  text-align: center;
}

.sticky-col {
  position: sticky;
  z-index: 5;
  background: white;
}

.sticky-col-logo {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
}
.sticky-col-logo a {
  display: block;
}

.sticky-col-hcode {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}
.sticky-col-hcode a {
  color: #007bff;
  text-decoration: none;
}
.sticky-col-hcode a:hover {
  text-decoration: underline;
}

.sticky-separator::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  background: #999;
  z-index: 6;
  pointer-events: none;
}

thead .sticky-separator::after {
  z-index: 16;
}

.sticky-col-filter {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  background: white;
}

thead .sticky-col,
thead .toggle-all-col {
  background: #f8f9fa;
  z-index: 15;
}

thead .sticky-col-filter {
  background: #f8f9fa;
}

tbody .sticky-col,
tbody .sticky-col-filter {
  background: white;
}

tr:nth-child(even) .sticky-col,
tr:nth-child(even) .toggle-all-col,
tr:nth-child(even) .sticky-col-filter {
  background: #fafafa;
}

tr:hover .sticky-col,
tr:hover .toggle-all-col,
tr:hover .sticky-col-filter {
  background: #f0f7ff !important;
}

.group-chips-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}
.group-chips-bar .group-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #e9ecef;
  color: #495057;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.group-chips-bar .group-chip:hover {
  background: #dee2e6;
}
.group-chips-bar .group-chip::before {
  content: "▼";
  font-size: 8px;
  margin-right: 2px;
}
.group-chips-bar .group-chip.active {
  background: #007bff;
  color: white;
}
.group-chips-bar .group-chip.active:hover {
  background: rgb(0, 98.4, 204);
}
.group-chips-bar .group-chip.collapsed {
  background: #6c757d;
  color: white;
}
.group-chips-bar .group-chip.collapsed:hover {
  background: #5a6268;
}
.group-chips-bar .group-chip.collapsed::before {
  content: "▶";
}

.groups-row {
  background: #e9ecef;
}
.groups-row th {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}
.groups-row .groups-row-sticky {
  background: #e9ecef;
  z-index: 15;
}
.groups-row .groups-row-empty {
  background: #f8f9fa;
}
.groups-row .groups-row-group {
  text-align: left;
  cursor: pointer;
  user-select: none;
  border-left: 2px solid #dee2e6;
  padding: 0;
}
.groups-row .groups-row-group:hover {
  background: #dee2e6;
}
.groups-row .groups-row-group.collapsed {
  display: none;
}
.groups-row .groups-row-group .group-name {
  display: inline-block;
  position: sticky;
  left: var(--sticky-cols-width, 110px);
  padding: 4px 8px;
}

.group-first-col {
  border-left: 2px solid #dee2e6;
}

.group-header-cell {
  width: 0;
  min-width: 0;
  max-width: 0;
  padding: 0 !important;
  border: none !important;
  overflow: hidden;
}

thead .group-header-cell {
  background: transparent !important;
}

.column-hidden {
  display: none !important;
}

.filter-col-highlight {
  background: #fffde7 !important;
}

tr:nth-child(even) .filter-col-highlight {
  background: #fff8dc !important;
}

thead .filter-col-highlight {
  background: #fffde7 !important;
}

.filter-header {
  font-size: 10px;
  color: #666;
}

tfoot {
  display: none;
}

.column-count-indicator {
  position: fixed;
  background: #f0f0f0;
  border-top: 2px solid #bbb;
  color: #666;
  padding: 4px 0;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.1s ease;
}
.column-count-indicator.visible {
  opacity: 1;
}

.groupby-row {
  background: #e3f2fd !important;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 62px;
  z-index: 8;
}
.groupby-row:hover {
  background: #bbdefb !important;
}
.groupby-row td {
  font-weight: 600;
  padding: 10px 6px;
  border-bottom: 2px solid #90caf9;
  background: #e3f2fd !important;
}
.groupby-row .sticky-col,
.groupby-row .groupby-name-cell {
  background: #e3f2fd !important;
  z-index: 9;
}
.groupby-row .groupby-toggle::before {
  content: "▼ ";
  font-size: 10px;
  margin-right: 4px;
}
.groupby-row.collapsed .groupby-toggle::before {
  content: "▶ ";
}
.groupby-row .groupby-count {
  font-weight: normal;
  color: #666;
  margin-left: 8px;
}

.grouped-row.hidden {
  display: none;
}

.grouped-row .sticky-col-logo {
  padding-left: 20px;
}

.groupby-name-cell {
  text-align: left;
  padding-left: 10px;
}

.toggle-all-col {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.toggle-all-col:hover {
  background: #dee2e6 !important;
}

/*# sourceMappingURL=style.css.map */
