﻿:root{
  --soft-bg: #eef3ff;
  --card-radius: 18px;
  --home-border: #d8e2f0;
  --home-ink: #17324d;
  --home-muted: #5f748d;
  --home-accent: #1e63d7;
  --home-accent-dark: #154aa5;
}

/* Barras de desplazamiento compactas y consistentes en toda la aplicación. */
*{
  scrollbar-color: #aab6c5 #edf1f6;
  scrollbar-width: thin;
}

*::-webkit-scrollbar{
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track{
  border-radius: 999px;
  background: #edf1f6;
}

*::-webkit-scrollbar-thumb{
  border: 1px solid #edf1f6;
  border-radius: 999px;
  background: #aab6c5;
}

*::-webkit-scrollbar-thumb:hover{
  background: #7f91a7;
}

body.bg-soft{
  background:
    radial-gradient(1000px circle at 0% 0%, rgba(255, 255, 255, .92) 0, rgba(255, 255, 255, 0) 38%),
    radial-gradient(880px circle at 100% 0%, rgba(177, 209, 255, .2) 0, rgba(177, 209, 255, 0) 42%),
    linear-gradient(180deg, #edf3fb 0%, #e7eef8 100%);
}

.login-page{
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.login-shell{
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.login-card{
  width: min(520px, 100%);
  max-height: calc(100dvh - clamp(2rem, 6vw, 4rem));
  border-radius: var(--card-radius);
  overflow: auto;
  overscroll-behavior: contain;
}

.login-header{
  padding: clamp(1.25rem, 4vw, 2rem);
  background: linear-gradient(180deg, #1b5cff 0%, #0d3db8 100%);
}

.login-title{
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.login-subtitle{
  margin-top: .25rem;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(.92rem, 3.4vw, 1rem);
}

.login-body{
  padding: clamp(1.25rem, 5vw, 3rem);
}

.login-field{
  margin-bottom: clamp(1rem, 3.5vw, 1.5rem);
}

.login-card .form-control-lg,
.login-card .btn-lg{
  min-height: 3rem;
  font-size: 1rem;
}

@media (max-width: 380px){
  .login-shell{
    padding: .75rem;
  }

  .login-card{
    border-radius: 16px;
    max-height: calc(100dvh - 1.5rem);
  }

  .login-header,
  .login-body{
    padding-inline: 1.15rem;
  }
}

@media (max-height: 620px){
  .login-shell{
    align-items: flex-start;
    padding-block: .75rem;
  }

  .login-card{
    max-height: calc(100dvh - 1.5rem);
  }

  .login-header{
    padding-block: 1rem;
  }

  .login-body{
    padding-block: 1rem;
  }

  .login-field{
    margin-bottom: .85rem;
  }
}

.card{
  border-radius: var(--card-radius);
}

.icon-circle{
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: #e7efff;
  display: grid;
  place-items: center;
}

.rounded-4{
  border-radius: 22px !important;
}

.form-control, .input-group-text{
  border-color: #d7ddea;
}

.form-control:focus{
  border-color: #86b7fe;
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.15);
}

.btn-primary{
  box-shadow: 0 10px 24px rgba(13,110,253,.20);
}

.main-home-navbar{
  border-bottom: 1px solid rgba(216, 226, 240, .9);
  backdrop-filter: blur(10px);
}

.main-screen{
  min-height: calc(100dvh - 88px);
}

.main-grid-body{
  min-height: clamp(420px, calc(100dvh - 250px), 880px);
  display: flex;
  flex-direction: column;
}

.orders-panel{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.orders-table-wrapper{
  flex: 1;
  min-height: 260px;
  overflow: auto;
}

.main-home-screen{
  height: calc(100dvh - 88px);
  min-height: calc(100dvh - 88px);
  display: flex;
  box-sizing: border-box;
}

.home-shell{
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-hero{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 1.5rem;
  background:
    linear-gradient(135deg, rgba(10, 37, 64, .96) 0%, rgba(18, 74, 140, .94) 58%, rgba(48, 117, 196, .88) 100%);
  box-shadow: 0 20px 45px rgba(17, 44, 78, .18);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.home-hero::after{
  content: "";
  position: absolute;
  inset: auto -5% -40% auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.home-hero-copy{
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.home-eyebrow{
  display: inline-flex;
  align-items: center;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-title{
  font-size: clamp(1.6rem, 2.3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -.02em;
}

.home-subtitle{
  max-width: 72ch;
  color: rgba(255, 255, 255, .82);
  font-size: 1rem;
}

.home-hero-user{
  position: relative;
  z-index: 1;
  min-width: 220px;
  padding: 1rem 1.15rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.home-hero-user-label{
  display: block;
  margin-bottom: .3rem;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

.home-workspace-card{
  flex: 1;
  min-height: 0;
  background: linear-gradient(180deg, rgba(251, 253, 255, .98) 0%, rgba(245, 249, 255, .98) 100%);
  box-shadow: 0 18px 40px rgba(17, 44, 78, .08);
  overflow: hidden;
  border-radius: 0 !important;
}

.home-workspace-card .main-grid-body{
  height: 100%;
  min-height: 0;
}

.hc-screen{
  height: calc(100dvh - 88px);
  min-height: calc(100dvh - 88px);
  display: flex;
}

.hc-shell{
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hc-workspace-card{
  flex: 1;
  min-height: 0;
  background: linear-gradient(180deg, rgba(251, 253, 255, .98) 0%, rgba(245, 249, 255, .98) 100%);
  box-shadow: 0 18px 40px rgba(17, 44, 78, .08);
  overflow: hidden;
  border-radius: 0 !important;
}

.hc-grid-body{
  height: 100%;
  min-height: 0;
}

.hc-main-grid-body{
  padding: 0 !important;
}

.hc-orders-panel{
  gap: 0;
}

.hc-toolbar-card,
.hc-table-card{
  border: 1px solid var(--home-border);
  border-radius: 0;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 28px rgba(18, 62, 111, .06);
}

.hc-toolbar-card{
  padding: 1rem 1.1rem;
}

.hc-table-card{
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding: 0;
}

.hc-toolbar-head{
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 0;
}

.hc-toolbar-copy{
  max-width: 760px;
}

.hc-section-kicker{
  display: inline-flex;
  margin-bottom: .35rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7f97;
}

.hc-section-text{
  color: var(--home-muted);
  font-size: .94rem;
}

.hc-toolbar{
  gap: .85rem;
  position: relative;
  z-index: 1030;
}

.hc-page-title{
  margin-right: auto;
  color: var(--home-ink);
  font-size: clamp(1.1rem, 1.2vw + .9rem, 1.95rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.hc-toolbar-meta{
  gap: .5rem;
  position: relative;
  z-index: 1030;
  justify-content: flex-end;
}

.hc-toolbar-meta .dropdown{
  position: relative;
}

.hc-toolbar-meta .dropdown-menu{
  z-index: 1035;
}

.hc-history-table-wrapper{
  position: relative;
  z-index: 1;
  min-height: 0;
  border-color: var(--home-border) !important;
  border-radius: 0 !important;
  background: #fff;
}

.hc-history-table{
  --bs-table-striped-bg: #f7fafe;
  --bs-table-hover-bg: #eef4fb;
}

.hc-history-table thead th{
  padding: .95rem 1rem;
  border-bottom: 1px solid #dbe4ef;
  background: #f5f8fc !important;
  color: #486079;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.hc-history-table tbody td{
  padding: .9rem 1rem;
  border-color: #ebf0f6;
  color: #27405d;
  vertical-align: middle;
}

.hc-history-table tbody tr{
  transition: background-color .18s ease;
}

.hc-history-table tbody .btn{
  min-width: 110px;
}

.hc-filter-bar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  margin: 0 1rem .75rem;
}

.hc-filter-group{
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.hc-indicaciones-check{
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .7rem;
  border: 1px solid #d8e6f6;
  border-radius: .65rem;
  background: #f8fbff;
  color: #31516f;
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
}

.hc-indicaciones-check .form-check-input{
  margin: 0;
}

.hc-filter-label{
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5a7089;
  white-space: nowrap;
}

.hc-service-filter-group{
  flex: 1 1 360px;
  max-width: 520px;
}

.hc-date-filter-group{
  flex: 0 1 470px;
}

.hc-date-range-group{
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}

.hc-date-input-group{
  min-width: 156px;
  border-radius: .65rem;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(18, 62, 111, .06);
}

.hc-date-input-group .form-control,
.hc-date-input-group .input-group-text,
.hc-date-clear-btn{
  min-height: 38px;
  border-color: #d3deeb;
}

.hc-date-input-group .input-group-text{
  color: #60758f;
  font-weight: 700;
}

.hc-date-clear-btn{
  min-width: 42px;
}

.hc-service-search-group{
  border-radius: .65rem;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(18, 62, 111, .06);
}

.hc-service-search-group .form-control,
.hc-service-search-group .input-group-text,
.hc-service-search-group .btn{
  min-height: 38px;
  border-color: #d3deeb;
}

.hc-service-search-group .input-group-text{
  color: #60758f;
}

.hc-service-search-group .btn{
  min-width: 42px;
}

.home-orders-table tbody tr.indicacion-alert-row > *,
.hc-history-table tbody tr.indicacion-alert-row > *,
.php-card .table tbody tr.indicacion-alert-row > *{
  background-color: #ffe3e6 !important;
  color: #7f1d1d;
}

.home-orders-table tbody tr.indicacion-alert-row:hover > *,
.hc-history-table tbody tr.indicacion-alert-row:hover > *,
.php-card .table tbody tr.indicacion-alert-row:hover > *{
  background-color: #ffd6dc !important;
}

.hc-table-meta{
  margin: 0 1rem .75rem;
  padding: .55rem .8rem;
  border-radius: 999px;
  background: #eff5fd;
  border: 1px solid #d8e6f6;
  white-space: nowrap;
}

.hc-table-meta:empty{
  display: none !important;
}

.hc-pagination-row{
  margin-top: 0;
  padding: .5rem 1rem 0;
}

.hc-print-frame{
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid #d9e3f1;
  border-radius: .75rem;
  background: #fff;
}

.hc-doc-image-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.hc-doc-image-link{
  display: block;
  overflow: hidden;
  border: 1px solid #d9e3f1;
  border-radius: .75rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.hc-doc-image-link img{
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef3fa;
}

.hc-doc-image-caption{
  padding: .5rem .65rem;
  font-size: .78rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hc-doc-pdf-frame{
  width: 100%;
  min-height: min(65vh, 680px);
  border: 1px solid #d9e3f1;
  border-radius: .75rem;
  background: #fff;
}

.hc-doc-pdf-list .list-group-item{
  border-color: #d9e3f1;
}

.hc-doc-pdf-list .active{
  background-color: #1d66b2;
  border-color: #1d66b2;
}

.home-main-grid-body{
  padding-top: .4rem !important;
  padding-bottom: .4rem !important;
}

.home-orders-panel{
  gap: 0;
}

.home-toolbar-card,
.home-table-card,
.home-occupancy-panel{
  border: 1px solid var(--home-border);
  border-radius: 0;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 28px rgba(18, 62, 111, .06);
}

.home-occupancy-panel{
  padding: .9rem;
  border-bottom: 0;
}

.home-occupancy-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.home-occupancy-title-row{
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--home-ink);
}

.home-occupancy-title-row > i{
  color: var(--home-accent-dark);
  font-size: 1.15rem;
}

.home-occupancy-title{
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.home-occupancy-summary{
  margin: .2rem 0 0 1.7rem;
  color: var(--home-muted);
  font-size: .82rem;
}

.home-occupancy-content{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: .75rem;
  max-height: 390px;
  overflow: auto;
  padding: .1rem;
}

.home-room-card{
  align-self: start;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 5px 16px rgba(18, 62, 111, .05);
}

.home-room-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .85rem;
  border-bottom: 1px solid #e5eaf0;
  color: #52667b;
  font-size: .82rem;
  font-weight: 700;
}

.home-room-name{
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--home-ink);
  font-size: .98rem;
  font-weight: 800;
}

.home-room-name i{
  color: var(--home-accent-dark);
}

.home-bed-row{
  padding: .7rem .85rem;
}

.home-bed-row + .home-bed-row{
  border-top: 1px solid #edf0f4;
}

.home-bed-label{
  margin-bottom: .45rem;
  color: #64778a;
  font-size: .78rem;
  font-weight: 700;
}

.home-bed-patient{
  display: flex;
  align-items: center;
  gap: .7rem;
}

.home-patient-avatar{
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffe2e4;
  color: #a32632;
  font-size: .8rem;
  font-weight: 800;
}

.home-bed-row.is-available .home-patient-avatar{
  background: #dff5e9;
  color: #157452;
}

.home-patient-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  color: #536579;
  font-size: .82rem;
  line-height: 1.3;
}

.home-patient-copy strong{
  overflow-wrap: anywhere;
  color: var(--home-ink);
  font-size: .94rem;
}

.home-bed-row.is-available .home-patient-copy strong{
  color: #157452;
}

.home-occupancy-loading,
.home-occupancy-empty,
.home-occupancy-error{
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 90px;
  padding: 1rem;
  border: 1px dashed #cfdae7;
  border-radius: .8rem;
  color: var(--home-muted);
  text-align: center;
}

.home-occupancy-error{
  border-color: #efc8cc;
  background: #fff7f8;
  color: #a32632;
}

.home-service-panel{
  --home-otros-button-width: 118px;
  --home-emergency-button-width: 58px;
  --home-print-button-width: 76px;
  --home-search-button-width: 60px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) var(--home-otros-button-width) var(--home-print-button-width) var(--home-search-button-width) var(--home-emergency-button-width);
  gap: .7rem;
  padding: .8rem;
  border: 1px solid var(--home-border);
  border-bottom: 0;
  background: rgba(248, 251, 255, .94);
  box-shadow: 0 12px 28px rgba(18, 62, 111, .06);
}

.home-service-button{
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem .95rem;
  border: 1px solid #ccdaec;
  border-radius: .65rem;
  background: #fff;
  color: var(--home-ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(18, 62, 111, .06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.home-service-button:hover,
.home-service-button:focus-visible{
  border-color: var(--home-accent);
  background: #f8fbff;
  box-shadow: 0 12px 24px rgba(18, 62, 111, .12);
  transform: translateY(-1px);
}

.home-service-button.is-active{
  border-color: var(--home-accent);
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(30, 99, 215, .16), 0 12px 24px rgba(18, 62, 111, .12);
}

.home-service-button.is-loading{
  cursor: wait;
}

.home-service-button.is-loading .home-service-button-icon i{
  visibility: hidden;
}

.home-service-button.is-loading .home-service-button-icon::after{
  content: "";
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  grid-area: 1 / 1;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: home-service-button-spin .7s linear infinite;
}

.home-service-button:disabled{
  opacity: .72;
  pointer-events: none;
}

.home-service-button.is-loading:disabled{
  opacity: 1;
}

@keyframes home-service-button-spin{
  to{
    transform: rotate(360deg);
  }
}

.home-service-button:focus-visible{
  outline: 3px solid rgba(30, 99, 215, .18);
  outline-offset: 2px;
}

.home-service-button-icon{
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: .7rem;
  background: #eaf2ff;
  color: var(--home-accent-dark);
  font-size: 1.25rem;
}

.home-service-button-label{
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.16;
}

.home-service-button-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.home-service-button-stats{
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .7rem;
  color: #48657f;
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.15;
}

.home-service-button-stats strong{
  color: var(--home-ink);
  font-size: .8rem;
}

.home-service-button-count{
  min-width: 2rem;
  height: 2rem;
  margin-left: auto;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #b4232c;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 6px 14px rgba(118, 16, 24, .18);
}

.home-service-button-guardia .home-service-button-icon{
  background: #e9f8f2;
  color: #157452;
}

.home-service-button-cirugia .home-service-button-icon{
  background: #fff2e6;
  color: #a65312;
}

.home-service-button-uti .home-service-button-icon{
  background: #f1edff;
  color: #5a3db6;
}

.home-service-button-domiciliaria .home-service-button-icon{
  background: #e8f8f5;
  color: #137765;
}

.home-service-button-otros .home-service-button-icon{
  background: #edf5f7;
  color: #33616d;
}

.home-service-button.home-service-button-otros{
  width: var(--home-otros-button-width);
  min-width: var(--home-otros-button-width);
  max-width: var(--home-otros-button-width);
  justify-self: start;
  justify-content: center;
  gap: .5rem;
  padding-inline: .65rem;
}

.home-service-button-otros .home-service-button-label{
  white-space: nowrap;
}

.home-service-button-shared{
  width: var(--home-print-button-width);
  min-width: var(--home-print-button-width);
  max-width: var(--home-print-button-width);
  min-height: 76px;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: .35rem;
  justify-self: start;
}

.home-service-button-shared > .home-service-button{
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  justify-content: center;
  padding: 0;
  border-radius: .55rem;
  text-decoration: none;
}

.home-service-button-shared .home-service-button-icon{
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border-radius: .45rem;
  font-size: .9rem;
}

.home-service-button-print .home-service-button-icon{
  background: #e8f6ff;
  color: #0f5f8c;
}

.home-service-button-recorrido .home-service-button-icon{
  background: #e9f8f2;
  color: #157452;
}

.home-bed-icon{
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recorrido-screen .home-shell{
  padding: .8rem 0 5.8rem;
}

.app-bottom-nav{
  width: 100%;
  margin-top: auto;
  position: sticky;
  bottom: .8rem;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .35rem;
  padding: .45rem;
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 32px rgba(18, 62, 111, .16);
  backdrop-filter: blur(12px);
}

.app-bottom-nav-item{
  width: 100%;
  min-width: 0;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: .4rem .3rem;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: var(--home-ink);
  text-align: center;
  transition: color .18s ease, transform .18s ease, background-color .18s ease;
}

.app-bottom-nav-item:hover,
.app-bottom-nav-item:focus-visible{
  background: #eef5ff;
  color: var(--home-accent-dark);
  transform: translateY(-1px);
}

.app-bottom-nav-item.is-active{
  background: #eef5ff;
  color: var(--home-accent-dark);
  box-shadow: inset 0 0 0 1px rgba(30, 99, 215, .16);
}

.app-bottom-nav-item.is-loading{
  cursor: wait;
  opacity: .78;
}

.recorrido-occupancy-panel{
  border: 0;
  border-radius: 1rem;
  background: #f9fbfe;
  box-shadow: none;
}

.recorrido-screen .recorrido-occupancy-panel{
  padding: .9rem 0;
}

.recorrido-screen .home-occupancy-header{
  padding-inline: .9rem;
}

.recorrido-screen .home-occupancy-content{
  padding-inline: 0;
}

.recorrido-screen .home-room-header,
.recorrido-screen .home-bed-row + .home-bed-row{
  border: 0;
}

.recorrido-bed-heading{
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .45rem;
}

.recorrido-bed-heading .home-bed-label{
  margin-bottom: 0;
}

.recorrido-bed-patient-button,
.recorrido-bed-release-button{
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: .35rem;
  background: #eaf2ff;
  color: var(--home-accent-dark);
  font-size: .8rem;
  line-height: 1;
}

.recorrido-bed-patient-button:hover,
.recorrido-bed-patient-button:focus-visible{
  background: #dbe9ff;
  color: #124fb4;
}

.recorrido-bed-release-button{
  background: #e3f5ec;
  color: #157452;
}

.recorrido-bed-release-button:hover,
.recorrido-bed-release-button:focus-visible{
  background: #d2eddf;
  color: #0e6042;
}

.recorrido-release-summary{
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem;
  border-radius: .75rem;
  background: #f5f8fc;
  color: #607286;
  font-size: .85rem;
}

.recorrido-release-summary strong{
  color: var(--home-ink);
  font-size: .95rem;
}

.recorrido-patient-modal-body{
  background: #f7f9fc;
}

.recorrido-patient-search{
  position: sticky;
  top: 0;
  z-index: 2;
  max-width: 900px;
}

.recorrido-patient-results{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: .65rem;
}

.recorrido-patient-result{
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .85rem;
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 3px 12px rgba(18, 62, 111, .08);
}

.recorrido-patient-result-icon{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--home-accent-dark);
}

.recorrido-patient-result-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  color: #607286;
  font-size: .78rem;
  line-height: 1.3;
}

.recorrido-patient-result-copy strong{
  overflow-wrap: anywhere;
  color: var(--home-ink);
  font-size: .9rem;
}

.recorrido-screen #btnRefreshRecorridoOccupancy{
  border-color: transparent;
}

.recorrido-screen .app-bottom-nav{
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(18, 62, 111, .14);
}

.recorrido-screen .app-bottom-nav-item{
  min-height: 76px;
  border-radius: 0;
}

.recorrido-screen .app-bottom-nav-item + .app-bottom-nav-item{
  border-left: 0;
}

.recorrido-screen .app-bottom-nav-item.is-active{
  box-shadow: none;
}

.app-bottom-nav-item:focus-visible{
  outline: 3px solid rgba(30, 99, 215, .18);
  outline-offset: -2px;
}

.app-bottom-nav-icon{
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: .6rem;
  font-size: 1rem;
}

.app-bottom-nav-label{
  min-width: 0;
  max-width: 100%;
  color: inherit;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.05;
  text-wrap: balance;
}

.recorrido-sector-guardia .app-bottom-nav-icon{
  background: #e9f8f2;
  color: #157452;
}

.recorrido-sector-clinica .app-bottom-nav-icon{
  background: #eaf2ff;
  color: #1e63d7;
}

.recorrido-sector-cirugia .app-bottom-nav-icon{
  background: #fff2e6;
  color: #a65312;
}

.recorrido-sector-uti .app-bottom-nav-icon{
  background: #f1edff;
  color: #5a3db6;
}

.recorrido-sector-domiciliaria .app-bottom-nav-icon{
  background: #e8f8f5;
  color: #137765;
}

.home-service-button-patient-search{
  min-width: var(--home-search-button-width);
  justify-content: center;
  padding-inline: .55rem;
}

.home-service-button-patient-search .home-service-button-icon{
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  background: #edf5ff;
  color: #245ca8;
  font-size: 1rem;
}

.patient-location-highlight{
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 3px #f0ad00;
}

.patient-location-highlight > *{
  animation: patient-location-pulse 1s ease-in-out 4;
  box-shadow: inset 0 3px #f0ad00, inset 0 -3px #f0ad00;
}

.patient-location-highlight > *:first-child{
  box-shadow: inset 3px 0 #f0ad00, inset 0 3px #f0ad00, inset 0 -3px #f0ad00;
}

.patient-location-highlight > *:last-child{
  box-shadow: inset -3px 0 #f0ad00, inset 0 3px #f0ad00, inset 0 -3px #f0ad00;
}

.patient-location-search-types{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.patient-location-search-option{
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: .75rem;
  font-weight: 600;
}

.patient-location-search-option .bi{
  font-size: 1.35rem;
  line-height: 1;
}

@keyframes patient-location-pulse{
  0%, 100%{ background-color: #fff3cd; }
  50%{ background-color: #ffe08a; }
}

.home-service-button-admin .home-service-button-icon{
  background: #edf2ff;
  color: #274690;
}

.home-service-button-icon-only{
  width: 42px;
  min-height: 42px;
  height: 42px;
  flex: 0 0 42px;
  justify-content: center;
  justify-self: center;
  padding: 0;
  text-align: center;
}

.admin-system-card-grid{
  display: grid;
  grid-template-columns: minmax(220px, 360px);
  gap: .75rem;
}

.admin-system-card{
  min-height: 42px;
}

.admin-system-screen{
  width: 100%;
  height: calc(100dvh - 76px);
  min-height: 0;
  padding: 1rem;
  overflow: hidden;
  box-sizing: border-box;
}

.admin-system-layout{
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 1rem;
  box-sizing: border-box;
}

.admin-system-sidebar{
  align-self: stretch;
  min-height: 100%;
  padding: 1rem .75rem;
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(18, 62, 111, .08);
}

.admin-system-sidebar-heading{
  padding: .35rem .65rem .8rem;
  color: var(--home-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-system-nav-link{
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  padding: .65rem .75rem;
  border-radius: .7rem;
  color: var(--home-ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.admin-system-nav-link:hover,
.admin-system-nav-link:focus-visible,
.admin-system-nav-link.active{
  background: #edf4ff;
  color: var(--home-accent-dark);
}

.admin-system-nav-link:focus-visible{
  outline: 2px solid var(--home-accent);
  outline-offset: 2px;
}

.admin-system-nav-link i{
  font-size: 1rem;
}

.admin-system-workspace{
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: .25rem;
}

.admin-system-placeholder{
  border-radius: 1rem;
}

.admin-user-edit-fields{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-user-edit-fields .form-label{
  margin-bottom: .4rem;
}

@media (max-width: 380px){
  .admin-user-edit-fields{
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-users-card{
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 1rem;
}

.admin-users-card > .card-body{
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.admin-users-search{
  flex: 0 1 440px;
  width: 100%;
  min-width: 0;
}

.admin-users-heading{
  min-width: 0;
}

.admin-users-heading h1{
  margin-bottom: 0 !important;
}

.admin-users-heading .btn{
  white-space: nowrap;
}

.admin-users-table-wrap{
  flex: 1 1 0;
  width: 100%;
  height: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--home-border);
  border-radius: .75rem;
}

.admin-users-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.admin-users-table{
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.admin-users-table th:last-child,
.admin-users-table td:last-child{
  width: 76px;
}

.admin-user-actions-toggle{
  width: 34px;
  height: 34px;
  padding: .25rem;
}

.admin-users-table th,
.admin-users-table td{
  overflow-wrap: anywhere;
}

.admin-users-table tbody tr:last-child td{
  border-bottom: 0;
}

.admin-users-table-wrap{
  overflow-x: hidden;
}

@media (max-width: 768px){
  .admin-users-table th:nth-child(3),
  .admin-users-table td:nth-child(3),
  .admin-users-table th:nth-child(4),
  .admin-users-table td:nth-child(4){
    display: none;
  }
}

@media (max-width: 576px){
  .admin-users-table th:nth-child(5),
  .admin-users-table td:nth-child(5){
    display: none;
  }
}

@media (max-width: 768px){
  .admin-users-card{
    height: 100%;
    min-height: 0;
  }

  .admin-users-card .card-body{
    min-height: 0;
  }

  .admin-user-badge{
    padding-inline: .6rem !important;
  }

  .admin-user-badge > span,
  .admin-navbar-action > span{
    display: none;
  }

  .admin-navbar-action{
    padding-inline: .6rem;
  }

  .admin-navbar-action .me-1{
    margin-right: 0 !important;
  }

  .admin-users-search{
    width: 100%;
    flex-basis: auto;
  }
}

.home-service-button-emergencias{
  width: var(--home-emergency-button-width);
  min-width: var(--home-emergency-button-width);
  max-width: var(--home-emergency-button-width);
  justify-self: start;
  justify-content: center;
  gap: 0;
  padding-inline: .5rem;
  border-color: #d72f3a;
  background: #c8212d;
  color: #fff;
  box-shadow: 0 10px 22px rgba(190, 24, 37, .18);
}

.home-service-button-emergencias:hover,
.home-service-button-emergencias:focus-visible{
  border-color: #b4232c;
  background: #b4232c;
  box-shadow: 0 14px 26px rgba(190, 24, 37, .26);
}

.home-service-button-emergencias.is-active{
  border-color: #8a1b24;
  background: #a61924;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .36), 0 14px 28px rgba(190, 24, 37, .3);
}

.home-service-button-emergencias .home-service-button-count{
  margin-left: 0;
}

.home-toolbar-card{
  padding: .8rem;
}

.home-table-card{
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding: 0;
}

.home-section-heading,
.home-table-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.home-section-kicker{
  display: inline-flex;
  margin-bottom: .35rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7f97;
}

.home-section-title,
.home-table-title{
  color: var(--home-ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.home-section-text,
.home-table-subtitle{
  color: var(--home-muted);
  font-size: .94rem;
}

.home-table-meta{
  padding: .55rem .8rem;
  border-radius: 999px;
  background: #eff5fd;
  border: 1px solid #d8e6f6;
  white-space: nowrap;
}

.home-table-meta:empty{
  display: none;
}

.home-search-group .form-control,
.home-search-group .input-group-text{
  min-height: 46px;
  border-color: #d3deeb;
}

.home-search-group .btn{
  min-height: 46px;
}

.home-toolbar{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 0;
}

.home-filter-group{
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.home-period-group{
  padding: .45rem;
  border: 1px solid #dbe5f1;
  border-radius: 1rem;
  background: #f6f9fd;
}

.home-search-group-wrap{
  flex: 1 1 540px;
}

.home-filter-label{
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5a7089;
  white-space: nowrap;
}

.home-period-group .form-select{
  min-width: 150px;
  border-radius: .8rem;
  border-color: #d0dceb;
  background-color: #fff;
}

.home-period-group .btn{
  min-width: 42px;
  min-height: 42px;
  border-radius: .8rem;
}

.home-search-group{
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(18, 62, 111, .06);
}

.home-search-group .input-group-text{
  padding-inline: .95rem;
  color: #60758f;
}

.home-search-group .form-control{
  background: #fff;
}

.home-orders-table-wrapper{
  width: 100%;
  max-width: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-color: var(--home-border) !important;
  border-radius: 0 !important;
  background: #fff;
}

.home-orders-table{
  --bs-table-striped-bg: #f7fafe;
  --bs-table-hover-bg: #eef4fb;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.home-orders-table thead th{
  padding: .95rem 1rem;
  border-bottom: 1px solid #dbe4ef;
  background: #f5f8fc !important;
  color: #486079;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.home-orders-table tbody td{
  padding: .9rem 1rem;
  border-color: #ebf0f6;
  color: #27405d;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.home-orders-table tbody tr{
  transition: background-color .18s ease;
}

.home-orders-table tbody .btn{
  min-width: 110px;
}

.home-orders-table .orders-number-column{
  width: 5.5%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-orders-table .orders-document-column{
  width: 7%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-orders-table .orders-patient-column{
  width: 21.8%;
  white-space: normal;
}

.home-orders-table .orders-coverage-column{
  width: 29.2%;
  white-space: normal;
}

.home-orders-table .orders-bed-column{
  width: 12.5%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal !important;
}

.home-orders-table .orders-date-column{
  width: 7.7%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-orders-table .orders-days-column{
  width: 5%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: .55rem;
  padding-right: .55rem;
}

.home-orders-table .orders-options-column{
  width: 7.1%;
  padding-left: .65rem;
  padding-right: .65rem;
  text-align: right;
}

.home-orders-table .orders-options-column .btn{
  width: 2.85rem;
  min-width: 0;
  padding-left: .45rem;
  padding-right: .45rem;
}

.orders-options-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
}

.patient-alert-icon{
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: .55rem;
  background: #d72f3a;
  color: #fff;
  font-size: .95rem;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(118, 16, 24, .2);
}

.home-pagination-row{
  margin-top: 0;
  padding: .35rem 0 0;
  border-top: 1px solid #e5ecf5;
}

.page-loader-overlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(245, 249, 255, .75);
  backdrop-filter: blur(2px);
  z-index: 2000;
}

.page-loader-overlay.show{
  display: flex;
}

.page-loader-box{
  display: inline-flex;
  align-items: center;
  padding: .8rem 1rem;
  border-radius: .8rem;
  background: #fff;
  border: 1px solid #d9e3f1;
  box-shadow: 0 8px 24px rgba(18, 62, 111, .14);
  color: #274668;
  font-weight: 600;
}

@media (max-width: 992px){
  .main-grid-body{
    min-height: calc(100dvh - 220px);
  }

  .main-home-screen{
    height: calc(100dvh - 76px);
    min-height: calc(100dvh - 76px);
  }

  .admin-system-screen{
    min-height: calc(100dvh - 76px);
  }

  .admin-system-layout{
    min-height: calc(100dvh - 108px);
  }

  .hc-screen{
    height: calc(100dvh - 76px);
    min-height: calc(100dvh - 76px);
  }

  .home-hero{
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero-user{
    width: 100%;
    min-width: 0;
  }

  .home-workspace-card .main-grid-body{
    height: auto;
    min-height: calc(100dvh - 190px);
  }

  .home-service-panel{
    --home-print-button-width: 70px;
    --home-search-button-width: 58px;
    grid-template-columns: repeat(2, minmax(0, 1fr)) var(--home-print-button-width) var(--home-search-button-width) var(--home-emergency-button-width);
  }

  .home-service-button-shared{
    grid-column: 3;
    grid-row: 1;
  }

  .home-service-button-emergencias{
    grid-column: 5;
    grid-row: 1 / span 3;
    align-self: start;
    justify-self: start;
  }

  .home-service-button-patient-search{
    grid-column: 4;
    grid-row: 1;
  }

  .hc-grid-body{
    height: auto;
    min-height: calc(100dvh - 190px);
  }
}

@media (max-width: 768px){
  .admin-system-navbar .navbar-brand img{
    width: 32px;
    height: 32px;
  }

  .admin-system-navbar .navbar-brand small{
    display: none;
  }

  .admin-system-screen{
    padding: .75rem;
  }

  .admin-system-layout{
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    gap: .75rem;
  }

  .admin-system-sidebar{
    min-height: 0;
    padding: .65rem;
  }

  .admin-system-sidebar-heading{
    padding-bottom: .45rem;
  }

  .admin-system-workspace{
    height: 100%;
    padding: 0;
  }

  .main-home-screen{
    height: auto;
    min-height: calc(100dvh - 76px);
    display: block;
  }

  .home-shell{
    min-height: 0;
    height: auto;
    gap: 0;
  }

  .home-workspace-card{
    min-height: 0;
    overflow: visible;
  }

  .home-workspace-card .main-grid-body,
  .home-main-grid-body,
  .home-orders-panel,
  .home-table-card{
    min-height: 0;
    height: auto;
  }

  .home-shell{
    gap: 0;
  }

  .home-hero{
    padding: 1rem;
    border-radius: 1.2rem;
  }

  .home-toolbar-card,
  .home-table-card,
  .home-occupancy-panel{
    padding: 0;
    border-radius: 0;
  }

  .home-occupancy-header{
    align-items: flex-start;
  }

  .home-occupancy-header .btn{
    padding-inline: .55rem;
  }

  .home-occupancy-content{
    grid-template-columns: 1fr;
    max-height: none;
  }

  .home-occupancy-panel{
    padding: .75rem;
  }

  .home-service-panel{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem;
    padding: .65rem;
  }

  .home-service-button-guardia,
  .home-service-button-clinica,
  .home-service-button-cirugia,
  .home-service-button-uti,
  .home-service-button-domiciliaria{
    grid-column: 1 / -1;
  }

  .recorrido-screen .home-shell{
    gap: .75rem;
    padding: .65rem 0 5.5rem;
  }

  .recorrido-patient-results{
    grid-template-columns: 1fr;
  }

  .recorrido-patient-result{
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .recorrido-patient-result-icon{
    width: 38px;
    height: 38px;
  }

  .recorrido-patient-result .btn{
    grid-column: 1 / -1;
    width: 100%;
  }

  .app-bottom-nav{
    bottom: .5rem;
    grid-template-columns: repeat(5, minmax(88px, 1fr));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .app-bottom-nav-item{
    min-height: 64px;
  }

  .home-service-button{
    min-height: 62px;
    padding: .7rem .8rem;
  }

  .home-service-button-icon-only{
    width: 42px;
    min-height: 42px;
    height: 42px;
    padding: 0;
  }

  .home-service-button.home-service-button-otros{
    grid-column: 1 / span 3;
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
  }

  .home-service-button-emergencias{
    grid-column: 4;
    grid-row: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
  }

  .home-service-button-shared{
    grid-column: 4;
    grid-row: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 62px;
    justify-self: stretch;
  }

  .home-service-button-patient-search{
    grid-column: 1 / span 3;
    grid-row: auto;
    min-width: 0;
    width: 100%;
  }

  .home-section-heading,
  .home-table-header{
    flex-direction: column;
    align-items: stretch;
  }

  .home-table-meta{
    width: 100%;
    white-space: normal;
  }

  .home-toolbar{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    margin-top: 0;
  }

  .home-filter-group{
    width: 100%;
  }

  .home-period-group{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .55rem;
    align-items: center;
  }

  .home-filter-label{
    grid-column: 1 / -1;
  }

  .home-period-group .form-select{
    min-width: 0;
    width: 100% !important;
  }

  .home-period-group .btn{
    justify-self: end;
  }

  .home-search-group-wrap{
    flex: 1 1 auto;
  }

  .hc-main-grid-body{
    padding: 0 !important;
  }

  .hc-screen{
    height: auto;
    min-height: calc(100dvh - 76px);
    display: block;
  }

  .hc-shell{
    min-height: 0;
    height: auto;
  }

  .hc-workspace-card{
    min-height: 0;
    overflow: visible;
  }

  .hc-grid-body,
  .hc-orders-panel,
  .hc-table-card{
    min-height: 0;
    height: auto;
  }

  .hc-toolbar-card{
    padding: .9rem;
  }

  .hc-toolbar{
    align-items: stretch !important;
  }

  .hc-toolbar-head{
    flex-direction: column;
    align-items: stretch;
    margin-bottom: .85rem;
  }

  .hc-toolbar h1{
    width: 100%;
    margin-bottom: 0;
  }

  .hc-toolbar-meta{
    width: 100%;
    justify-content: flex-start;
  }

  .hc-toolbar-meta .badge{
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .hc-toolbar-meta .dropdown{
    width: 100%;
  }

  .hc-toolbar-meta .dropdown > .btn{
    width: 100%;
  }

  .hc-print-frame{
    height: 58vh;
  }

  .hc-filter-bar{
    margin: .9rem .9rem .7rem;
    align-items: stretch;
    justify-content: stretch;
  }

  .hc-filter-group{
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
  }

  .hc-indicaciones-check{
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .hc-service-filter-group{
    max-width: none;
  }

  .hc-date-range-group{
    flex-direction: column;
    align-items: stretch;
  }

  .hc-date-input-group{
    width: 100%;
    min-width: 0;
  }

  .hc-date-clear-btn{
    width: 100%;
  }

  .hc-table-meta{
    margin: .9rem .9rem .7rem;
    width: auto;
    white-space: normal;
  }

  .mobile-card-table-wrapper{
    border: 0 !important;
    background: transparent;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .mobile-card-table thead{
    display: none;
  }

  .mobile-card-table,
  .mobile-card-table tbody{
    display: block;
    width: 100%;
  }

  .mobile-card-table tbody{
    display: flex;
    flex-direction: column;
    gap: .7rem;
  }

  .mobile-card-table tbody tr{
    display: flex;
    flex-direction: column;
    gap: .45rem;
    border: 1px solid #d9e3f1;
    border-radius: .85rem;
    background: #fff;
    padding: .75rem;
    box-shadow: 0 3px 12px rgba(18, 62, 111, .08);
  }

  .mobile-card-table tbody tr.indicacion-alert-row{
    border-color: #f1a7a0;
    background: #fff1f2;
  }

  .mobile-card-table tbody tr.indicacion-alert-row td{
    background: transparent !important;
    color: #7f1d1d;
  }

  .mobile-card-table tbody td{
    display: flex;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
    border: 0;
    padding: 0;
    text-align: right;
    white-space: normal !important;
    word-break: break-word;
  }

  .mobile-card-table .orders-number-column,
  .mobile-card-table .orders-document-column,
  .mobile-card-table .orders-patient-column,
  .mobile-card-table .orders-coverage-column,
  .mobile-card-table .orders-bed-column,
  .mobile-card-table .orders-date-column,
  .mobile-card-table .orders-days-column,
  .mobile-card-table .orders-options-column{
    width: 100% !important;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
    text-overflow: clip;
  }

  .mobile-card-table tbody td::before{
    content: attr(data-label);
    flex: 0 0 8.25rem;
    max-width: 44%;
    text-align: left;
    color: #455f7d;
    font-weight: 600;
    margin-right: auto;
    overflow-wrap: normal;
    word-break: normal;
  }

  .mobile-card-table tbody td > :not(.dropdown){
    min-width: 0;
  }

  .mobile-card-table tbody td.mobile-card-cell-action{
    justify-content: flex-end;
    padding-top: .15rem;
  }

  .mobile-card-table tbody td.mobile-card-cell-action::before{
    content: none;
  }

  .mobile-card-table tbody td.mobile-card-cell-action .btn{
    min-width: 72px;
  }

  .mobile-card-table tbody tr.mobile-card-table-message-row{
    display: block;
    text-align: center;
    padding: .8rem;
  }

  .mobile-card-table tbody tr.mobile-card-table-message-row td{
    display: block;
    padding: 0;
    text-align: center;
  }

  .mobile-card-table tbody tr.mobile-card-table-message-row td::before{
    content: none;
  }

  .home-table-card .home-pagination-row{
    align-items: flex-start !important;
    row-gap: .4rem;
    margin-top: .15rem;
    padding-top: .45rem;
    border-top: 1px solid #d9e3f1;
  }

  .home-table-card .home-pagination-row #ordenesPageInfo{
    width: 100%;
    line-height: 1.25;
  }

  .home-table-card .home-pagination-row nav{
    width: 100%;
    overflow-x: auto;
  }

  .home-table-card .home-pagination-row .pagination{
    flex-wrap: nowrap;
    width: max-content;
  }

  .hc-orders-panel .home-pagination-row{
    align-items: flex-start !important;
    row-gap: .4rem;
    margin-top: .15rem;
    padding: .45rem .9rem 0;
    border-top: 1px solid #d9e3f1;
  }

  .hc-orders-panel .home-pagination-row #historiasPageInfo{
    width: 100%;
    line-height: 1.25;
  }

  .hc-orders-panel .home-pagination-row nav{
    width: 100%;
    overflow-x: auto;
  }

  .hc-orders-panel .home-pagination-row .pagination{
    flex-wrap: nowrap;
    width: max-content;
  }
}

.legacy-form-shell{
  background: #e9e9e9;
  border: 1px solid #b8bcc3;
}

.legacy-title{
  font-weight: 700;
  color: #222;
  padding: 0 6px;
}

.legacy-box{
  border: 1px solid #aeb4bc;
  background: #f2f2f2;
}

.legacy-label{
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: #30363d;
  margin-bottom: 2px;
}

.legacy-input{
  border-radius: 0;
  border-color: #9da5ae;
  background: #f9f9f9;
  box-shadow: none !important;
}

.legacy-input[readonly]{
  background: #eceff2;
}

.legacy-textarea{
  min-height: 260px;
  resize: vertical;
  white-space: pre-wrap;
}

.legacy-gender{
  border: 1px solid #9da5ae;
  background: #eceff2;
  min-height: 31px;
}

.acto-modern-page{
  background:
    radial-gradient(700px circle at 92% -10%, rgba(49, 120, 198, .15), transparent 45%),
    radial-gradient(800px circle at -8% 110%, rgba(16, 87, 154, .15), transparent 45%);
}

.acto-hero{
  border-radius: 20px;
  background: linear-gradient(145deg, #f9fbff 0%, #f0f6ff 45%, #e7f0ff 100%);
}

.acto-chip{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(28, 102, 176, .1);
  color: #11436f;
  font-size: .82rem;
  font-weight: 600;
}

.acto-card{
  border-radius: 20px;
  overflow: hidden;
}

.acto-card .card-header h2{
  color: #163e67;
  font-weight: 700;
}

/* Recorrido fills the viewport between the header and its fixed sector bar. */
.recorrido-page{
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.recorrido-page > .main-home-navbar{
  position: relative;
  flex: 0 0 auto;
}

.recorrido-page > .recorrido-screen{
  flex: 1 1 0;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.recorrido-screen .home-shell{
  height: 100%;
  min-height: 0;
  gap: 0;
  padding: .65rem 0 76px;
}

.recorrido-screen .acto-card{
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
}

.recorrido-screen .acto-card > .card-header{
  flex: 0 0 auto;
}

.recorrido-screen .acto-card > .card-body{
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.recorrido-screen .recorrido-occupancy-panel{
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
}

.recorrido-screen .home-occupancy-content{
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
}

.acto-label{
  font-size: .78rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-weight: 700;
  color: #4a5e77;
  margin-bottom: .35rem;
}

.acto-input{
  border-radius: .75rem;
  border: 1px solid #ccd9ea;
  background: #f8fbff;
  min-height: 40px;
}

.acto-input[readonly]{
  background: #eef3fa;
  color: #34475e;
}

.acto-input:disabled{
  background: #eef3fa;
  color: #34475e;
  opacity: 1;
}

.acto-input:focus{
  border-color: #76a8df;
  box-shadow: 0 0 0 .2rem rgba(31, 108, 183, .15);
}

.acto-group .form-control{
  min-width: 0;
}

.acto-sexo-panel{
  min-height: 40px;
  border: 1px solid #ccd9ea;
  border-radius: .75rem;
  background: #f8fbff;
}

.indicacion-alerta-check{
  border-color: #f0b8be;
  background: #fff8f9;
  color: #7f1d1d;
  font-weight: 700;
}

.indicacion-alerta-check .form-check-input:checked{
  background-color: #c8212d;
  border-color: #c8212d;
}

.acto-textarea{
  min-height: clamp(240px, 42vh, 520px);
  resize: vertical;
}

@media (min-width: 769px){
  #actoMedicoInput{
    height: 500px;
    min-height: 500px;
    max-height: 500px;
    resize: none;
  }
}

.acto-textarea-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .45rem;
}

.acto-voice-btn{
  min-height: 36px;
  white-space: nowrap;
}

.acto-voice-btn.is-listening{
  color: #b42318;
  border-color: #f1a7a0;
  background: #fff4f2;
}

.acto-voice-status{
  min-height: 1rem;
}

.acto-upload-panel{
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  border-color: #d5e2f0 !important;
}

.acto-upload-panel h3{
  color: #163e67;
  font-weight: 700;
}

.acto-image-preview-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: .75rem;
}

.acto-image-thumb{
  position: relative;
  overflow: hidden;
  border: 1px solid #d5e2f0;
  border-radius: .75rem;
  background: #fff;
}

.acto-image-thumb img{
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef3fa;
}

.acto-image-thumb-footer{
  min-height: 58px;
  padding: .45rem .5rem;
  font-size: .76rem;
}

.acto-file-name{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acto-thumb-select{
  position: absolute;
  top: .45rem;
  left: .45rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 .25rem .75rem rgba(20, 45, 76, .14);
}

.acto-thumb-delete{
  position: absolute;
  top: .35rem;
  right: .35rem;
  z-index: 2;
}

.acto-pdf-list .list-group-item{
  background: #fff;
  border-color: #d5e2f0;
}

.acto-pdf-list .min-w-0{
  min-width: 0;
}

@media (max-width: 768px){
  .acto-textarea-toolbar{
    flex-direction: column;
    align-items: flex-start;
  }
}

.php-card{
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  border-color: #d5e2f0 !important;
}

.php-card .dropdown-menu{
  z-index: 1035;
}

.modal.modal-stacked{
  z-index: 1080;
}

.modal-backdrop.modal-stacked-backdrop{
  z-index: 1075;
}

.php-modal-divider{
  height: 1px;
  background: linear-gradient(90deg, rgba(117, 151, 187, 0), rgba(117, 151, 187, .65), rgba(117, 151, 187, 0));
}

.php-lookup{
  position: relative;
}

.php-lookup-dropdown{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  max-height: 240px;
  overflow-y: auto;
  padding: .45rem;
  border: 1px solid #cddbec;
  border-radius: .85rem;
  background: #fff;
  box-shadow: 0 18px 35px rgba(18, 62, 111, .12);
}

.php-lookup-option{
  width: 100%;
  border: 0;
  border-radius: .6rem;
  padding: .55rem .7rem;
  background: #fff;
  color: #163e67;
  text-align: left;
}

.php-lookup-option:hover,
.php-lookup-option:focus{
  background: #edf4ff;
  outline: 0;
}

.php-lookup-empty{
  padding: .55rem .7rem;
  color: #667a92;
  font-size: .92rem;
}

.php-agregado-row{
  background: #fff;
  border-color: #d8e4f0 !important;
}

.php-detail-grid{
  display: grid;
  gap: .85rem;
}

.php-detail-block{
  padding-top: .25rem;
  border-top: 1px solid #e2eaf4;
  white-space: pre-wrap;
}

.enfermeria-screen{
  min-height: calc(100dvh - 74px);
  display: flex;
  flex-direction: column;
}

.enfermeria-screen > .container-xxl{
  width: 100%;
  max-width: none;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.enfermeria-screen > .container-xxl > header{
  width: 100%;
  flex: 0 0 auto;
}

.enfermeria-screen > .container-xxl > header .card-body{
  align-items: flex-start !important;
}

.enfermeria-screen > .container-xxl > .row{
  flex: 1;
  min-height: 0;
}

.enfermeria-screen .row > section[aria-labelledby="nursingPlanTitle"]{
  min-height: 0;
}

.enfermeria-screen .row > section[aria-labelledby="nursingPlanTitle"] > .card{
  display: flex;
  flex-direction: column;
}

.enfermeria-screen .row > section[aria-labelledby="nursingPlanTitle"] .card-body{
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.nursing-patient-list{
  max-height: min(68vh, 760px);
  overflow: auto;
  overscroll-behavior: contain;
}

.nursing-sector-group + .nursing-sector-group{
  border-top: 1px solid #e7edf5;
}

.nursing-sector-heading{
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: .75rem 1rem .55rem;
  color: #536b86;
  background: #f7f9fc;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.nursing-sector-heading span{
  margin-left: auto;
  color: #74869b;
  font-weight: 600;
}

.nursing-patient-row{
  display: grid;
  width: 100%;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto 1rem;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border: 0;
  border-top: 1px solid #eef2f7;
  background: #fff;
  color: #183653;
  text-align: left;
  transition: background-color .15s ease, box-shadow .15s ease;
}

.nursing-patient-row:hover,
.nursing-patient-row:focus-visible{
  background: #f3f7ff;
  outline: none;
}

.nursing-patient-row.is-selected{
  background: #eaf2ff;
  box-shadow: inset 3px 0 #1e63d7;
}

.nursing-patient-icon{
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #1e63d7;
  font-size: 1.05rem;
}

.nursing-patient-main{
  display: grid;
  min-width: 0;
  gap: .2rem;
}

.nursing-patient-main strong,
.nursing-patient-main small{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nursing-patient-main strong{
  font-size: .92rem;
}

.nursing-patient-main small{
  color: #728198;
  font-size: .76rem;
}

.nursing-patient-bed{
  color: #536b86;
  font-size: .8rem;
  white-space: nowrap;
}

.nursing-patient-chevron{
  color: #9aa8b8;
}

.nursing-matrix-scroll{
  display: flex;
  flex: 1;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #dce5f0;
  border-radius: .65rem;
  overscroll-behavior-inline: contain;
}

.nursing-hour-matrix{
  width: max-content;
  min-width: max(100%, 900px);
  height: 100%;
  table-layout: auto;
}

.nursing-hour-matrix th:first-child{
  position: sticky;
  left: 0;
  z-index: 1;
  width: 187.5px;
  min-width: 187.5px;
  background: #f6f8fb;
}

.nursing-hour-matrix thead th{
  background: #f6f8fb;
  color: #46617e;
  font-size: .72rem;
  text-align: center;
}

.nursing-hour-matrix tbody td{
  height: 3.5rem;
  text-align: center;
  vertical-align: middle;
}

.nursing-hour-matrix tbody td.nursing-dose-overdue{
  background: #f8d7da;
}

.nursing-hour-matrix .nursing-dose-action{
  box-sizing: border-box;
  width: 80%;
  margin: .12rem 10%;
  cursor: pointer;
  font: inherit;
}

.nursing-hour-matrix .nursing-dose-action:disabled{
  cursor: default;
  opacity: 1;
}

.nursing-hour-matrix .nursing-dose-action:hover,
.nursing-hour-matrix .nursing-dose-action:focus-visible{
  outline: 2px solid #0d6efd;
  outline-offset: 1px;
}

.nursing-hour-matrix .nursing-dose-recorded{
  border-color: #8bc9a5;
  background: #e7f5ec;
  color: #1d5c35;
}

.nursing-hour-matrix .nursing-dose-omitted{
  border-color: #d8a1a5;
  background: #f8e8e9;
  color: #842029;
}

.nursing-hour-matrix .nursing-empty-label{
  color: #536b86;
  font-weight: 600;
}

.nursing-dose{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .08rem;
  margin: .12rem 0;
  padding: .22rem .35rem;
  border: 1px solid #a9d9ee;
  border-radius: .45rem;
  background: #eaf8fd;
  color: #14546b;
  line-height: 1.15;
}

.nursing-dose-php{
  border-color: #c9b5eb;
  background: #f3effb;
  color: #553b83;
}

.nursing-dose-time{
  font-size: .792rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 575.98px){
  .nursing-patient-list{
    max-height: 52vh;
  }

  .nursing-patient-row{
    grid-template-columns: 2rem minmax(0, 1fr) 1rem;
    gap: .6rem;
    padding-inline: .8rem;
  }

  .nursing-patient-icon{
    width: 2rem;
    height: 2rem;
  }

  .nursing-patient-bed{
    grid-column: 2;
    grid-row: 2;
  }

  .nursing-patient-chevron{
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

.hoja-enfermeria-table-wrapper{
  background: #fff;
}

.hoja-enfermeria-table{
  min-width: 1320px;
}

.hoja-enfermeria-table thead th{
  white-space: nowrap;
  vertical-align: middle;
}

.hoja-enfermeria-table tbody td{
  min-width: 92px;
  vertical-align: top;
}

.hoja-enfermeria-table tbody td:last-child{
  min-width: 72px;
}

.hoja-enfermeria-turno-label{
  min-width: 92px;
  min-height: 31px;
  display: flex;
  align-items: center;
  padding: .375rem .5rem;
  border: 1px solid #ccd9ea;
  border-radius: .375rem;
  background: #f8fbff;
  color: #34475e;
  font-weight: 600;
  white-space: nowrap;
}

.hoja-enfermeria-acciones-input{
  min-width: 280px;
  resize: vertical;
}

.hoja-enfermeria-guardia-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .95fr);
  gap: 1rem;
}

.hoja-enfermeria-guardia-panel{
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
  border-color: #dfe7f3 !important;
}

.hoja-enfermeria-guardia-table-wrapper{
  background: #fff;
}

.hoja-enfermeria-guardia-table{
  min-width: 1380px;
}

.hoja-enfermeria-guardia-table thead th{
  white-space: nowrap;
  vertical-align: middle;
}

.hoja-enfermeria-guardia-table tbody td{
  min-width: 88px;
  vertical-align: top;
}

.hoja-enfermeria-guardia-table tbody td:last-child{
  min-width: 110px;
}

.hoja-enfermeria-guardia-acciones-input{
  min-height: 160px;
  resize: vertical;
}

@media (max-width: 1199.98px){
  .hoja-enfermeria-guardia-layout{
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px){
  .anamnesis-line-field{
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .anamnesis-family-grid{
    grid-template-columns: 1fr;
  }

  .anamnesis-family-item{
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .anamnesis-check-grid{
    grid-template-columns: 1fr;
  }
}

.hoja-enfermeria-uti-header .form-control[readonly],
.hoja-enfermeria-uti-header .form-control:disabled{
  background: #f8fbff;
}

@media (min-width: 992px){
  .hoja-enfermeria-uti-header{
    display: grid;
    grid-template-columns: minmax(150px, 180px) minmax(180px, 1fr) minmax(180px, 1fr) 88px 96px;
    grid-template-areas:
      "fecha nombre nombre edad dias"
      "cama obra-social obra-social diagnostico diagnostico";
    gap: 1rem;
    margin-left: 0;
    margin-right: 0;
  }

  .hoja-enfermeria-uti-header > [class*="col-"]{
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .hoja-enfermeria-uti-header .hoja-enfermeria-uti-header-fecha{
    grid-area: fecha;
  }

  .hoja-enfermeria-uti-header .hoja-enfermeria-uti-header-nombre{
    grid-area: nombre;
  }

  .hoja-enfermeria-uti-header .hoja-enfermeria-uti-header-edad{
    grid-area: edad;
  }

  .hoja-enfermeria-uti-header .hoja-enfermeria-uti-header-dias{
    grid-area: dias;
  }

  .hoja-enfermeria-uti-header .hoja-enfermeria-uti-header-cama{
    grid-area: cama;
  }

  .hoja-enfermeria-uti-header .hoja-enfermeria-uti-header-diagnostico{
    grid-area: diagnostico;
  }

  .hoja-enfermeria-uti-header .hoja-enfermeria-uti-header-obra-social{
    grid-area: obra-social;
  }
}

.hoja-enfermeria-uti-table-wrapper{
  background: #fff;
}

.hoja-enfermeria-uti-table{
  min-width: 2400px;
}

.hoja-enfermeria-uti-table thead th{
  white-space: nowrap;
  vertical-align: middle;
}

.hoja-enfermeria-uti-table tbody td{
  min-width: 90px;
  vertical-align: top;
}

.hoja-enfermeria-uti-menu-cell{
  min-width: 94px;
  display: flex;
  gap: .4rem;
}

.anamnesis-check-grid .form-check{
  min-width: 0;
}

.anamnesis-check-grid .form-check-label,
.anamnesis-check-stack .form-check-label,
.anamnesis-family-item .form-label{
  display: block;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.hoja-enfermeria-uti-modal-section{
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.registro-enfermeria-subcard{
  padding: 1rem;
  border: 1px solid #dfe7f3;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.registro-enfermeria-vitals-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.registro-enfermeria-check-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem 1rem;
}

.registro-enfermeria-check-grid .form-check,
.registro-enfermeria-radio-group .form-check{
  margin-bottom: 0;
}

.registro-enfermeria-radio-group{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
}

.registro-enfermeria-textarea{
  min-height: 110px;
  resize: vertical;
}

.registro-enfermeria-textarea-lg{
  min-height: 180px;
  resize: vertical;
}

.registro-enfermeria-textarea-xl{
  min-height: 180px;
  resize: vertical;
}

.epicrisis-header-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.epicrisis-header-grid-wide{
  grid-column: 1 / -1;
}

.epicrisis-textarea{
  min-height: 140px;
  resize: vertical;
}

.epicrisis-textarea-lg{
  min-height: 220px;
  resize: vertical;
}

.epicrisis-hojas-row{
  display: flex;
  justify-content: flex-start;
}

.epicrisis-hojas-input{
  width: min(100%, 280px);
}

.anamnesis-block + .anamnesis-block{
  border-top: 1px solid #edf2f8;
  padding-top: 1.25rem;
}

.anamnesis-family-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem 1rem;
}

.anamnesis-family-item{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: .75rem;
  align-items: center;
}

.anamnesis-family-input{
  text-transform: uppercase;
}

.anamnesis-family-option span{
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8d7eb;
  border-radius: .55rem;
  background: #f8fbff;
  color: #2f4f71;
  font-size: .8rem;
  font-weight: 700;
}

.anamnesis-family-options{
  display: inline-flex;
  gap: .35rem;
  flex-wrap: nowrap;
  align-items: center;
}

.anamnesis-family-option{
  position: relative;
  margin: 0;
}

.anamnesis-family-option input{
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.anamnesis-family-option input:checked + span{
  border-color: #2f7d5c;
  background: #e5f4eb;
  color: #1f5b40;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 92, .18);
}

.anamnesis-family-option input:focus-visible + span{
  outline: 2px solid #2f7d5c;
  outline-offset: 2px;
}

.anamnesis-text-stack{
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.anamnesis-line-field{
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.anamnesis-check-grid{
  display: grid;
  grid-template-columns: repeat(var(--anamnesis-columns, 4), minmax(0, 1fr));
  gap: .75rem 1rem;
}

.anamnesis-check-grid .form-check,
.anamnesis-check-stack .form-check{
  margin-bottom: 0;
}

.anamnesis-column-groups{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.anamnesis-column-group{
  padding: 1rem;
  border: 1px solid #dfe7f3;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.anamnesis-check-stack{
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.anamnesis-textarea{
  min-height: 110px;
  resize: vertical;
}

.valoracion-critica-check-group{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  padding: .85rem 1rem;
  border: 1px solid #dfe7f3;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.valoracion-critica-check-group .form-check{
  margin-bottom: 0;
  min-width: 110px;
}

.valoracion-critica-subcard{
  height: 100%;
  padding: 1rem;
  border: 1px solid #dfe7f3;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.valoracion-critica-textarea-sm{
  min-height: 88px;
}

.valoracion-critica-textarea{
  min-height: 110px;
  resize: vertical;
}

.valoracion-critica-textarea-lg{
  min-height: 240px;
  resize: vertical;
}

.valoracion-critica-eva{
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: .25rem;
  padding: .85rem;
  border: 1px solid #dfe7f3;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
  max-width: 100%;
  overflow: hidden;
}

.valoracion-critica-eva-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  min-width: 0;
  padding: .25rem 0;
  background: transparent;
  border: 0;
  border-radius: .8rem;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.valoracion-critica-eva-item:hover{
  background: rgba(36, 85, 66, .06);
}

.valoracion-critica-eva-item:focus-visible{
  outline: 2px solid #2f7d5c;
  outline-offset: 2px;
}

.valoracion-critica-eva-item.is-selected{
  background: rgba(36, 85, 66, .1);
  box-shadow: inset 0 0 0 1px rgba(47, 125, 92, .25);
  transform: translateY(-1px);
}

.valoracion-critica-eva-number{
  font-size: .78rem;
  font-weight: 700;
  color: #315b49;
  line-height: 1;
}

.valoracion-critica-eva-face{
  width: min(100%, 34px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.valoracion-critica-eva-face svg{
  width: 100%;
  height: 100%;
  overflow: visible;
}

.valoracion-critica-eva-face circle{
  stroke: rgba(27, 71, 53, .18);
  stroke-width: 1.5;
}

.valoracion-critica-eva-face path,
.valoracion-critica-eva-face svg > circle:not(:first-child){
  fill: none;
  stroke: #214b3a;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.valoracion-critica-eva-face svg > circle:first-child{
  fill: #e9f4ec;
}

.valoracion-critica-eva-item.tone-calm .valoracion-critica-eva-face svg > circle:first-child{
  fill: #eef8f0;
}

.valoracion-critica-eva-item.tone-light .valoracion-critica-eva-face svg > circle:first-child{
  fill: #dff0e4;
}

.valoracion-critica-eva-item.tone-mid .valoracion-critica-eva-face svg > circle:first-child{
  fill: #cce7d5;
}

.valoracion-critica-eva-item.tone-strong .valoracion-critica-eva-face svg > circle:first-child{
  fill: #9fd0b2;
}

.valoracion-critica-eva-item.tone-intense .valoracion-critica-eva-face svg > circle:first-child{
  fill: #69b287;
}

.valoracion-critica-eva-item.is-selected .valoracion-critica-eva-face svg > circle:first-child{
  stroke: #2f7d5c;
  stroke-width: 2.2;
}

@media (max-width: 992px){
  .acto-hero .btn{
    width: 100%;
  }

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

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

  .epicrisis-header-grid{
    grid-template-columns: 1fr;
  }

  .valoracion-critica-eva{
    grid-template-columns: repeat(6, minmax(44px, 1fr));
  }
}

@media (max-width: 576px){
  .anamnesis-family-grid{
    grid-template-columns: 1fr;
  }

  .registro-enfermeria-vitals-grid,
  .registro-enfermeria-check-grid{
    grid-template-columns: 1fr;
  }

  .valoracion-critica-eva{
    grid-template-columns: repeat(4, minmax(44px, 1fr));
  }
}

@media (max-width: 767.98px){
  .hoja-enfermeria-table-wrapper{
    border: 0 !important;
    background: transparent;
    overflow: visible;
  }

  .hoja-enfermeria-table{
    min-width: 0;
  }

  .hoja-enfermeria-table thead{
    display: none;
  }

  .hoja-enfermeria-table,
  .hoja-enfermeria-table tbody{
    display: block;
    width: 100%;
  }

  .hoja-enfermeria-table tbody{
    display: flex;
    flex-direction: column;
    gap: .8rem;
  }

  .hoja-enfermeria-table tbody tr{
    display: flex;
    flex-direction: column;
    gap: .65rem;
    border: 1px solid #d9e3f1;
    border-radius: .95rem;
    background: #fff;
    padding: .85rem;
    box-shadow: 0 3px 12px rgba(18, 62, 111, .08);
  }

  .hoja-enfermeria-table tbody td{
    display: flex;
    flex-direction: column;
    gap: .35rem;
    border: 0;
    padding: 0;
    min-width: 0 !important;
  }

  .hoja-enfermeria-table tbody td::before{
    content: attr(data-label);
    color: #455f7d;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .hoja-enfermeria-table tbody td .form-control{
    width: 100%;
  }

  .hoja-enfermeria-turno-label{
    width: 100%;
    min-width: 0;
  }

  .hoja-enfermeria-acciones-input{
    min-width: 0;
    min-height: 110px;
  }

  .hoja-enfermeria-menu-cell{
    align-items: flex-start;
    padding-top: .15rem !important;
  }

  .hoja-enfermeria-menu-cell .btn{
    min-width: 110px;
  }

  .hoja-enfermeria-guardia-table,
  .hoja-enfermeria-uti-table{
    min-width: 0;
  }

  .hoja-enfermeria-guardia-table tbody td,
  .hoja-enfermeria-uti-table tbody td{
    min-width: 0 !important;
  }

  .hoja-enfermeria-uti-menu-cell{
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}
