.summary-list {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1c1917;
  margin: 0;
}

.summary-list__row {
  border-bottom: 1px solid #e7e5e4;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}

.summary-list__row:last-child {
  border-bottom: none;
}

.summary-list__key,
.summary-list__value,
.summary-list__actions {
  margin: 0;
  padding: 0;
}

.summary-list__key {
  font-weight: 500;
  color: #78716c;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.summary-list__value {
  color: #1c1917;
  font-size: 1rem;
}

.summary-list__actions {
  text-align: left;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .summary-list__actions {
    margin-top: 0;
  }
}

.summary-list__actions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.summary-list__actions-list-item {
  margin: 0;
}

.summary-list__action {
  font-weight: 500;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.summary-list__action--link {
  color: #1d4ed8;
  text-decoration: underline;
}

.summary-list__action:hover {
  color: #1e40af;
}

.summary-list__action:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 2px;
}

.summary-list__empty-link {
  color: #78716c;
  font-weight: 400;
  font-size: 0.9375rem;
  text-decoration: underline;
}

.summary-list__empty-link--action {
  color: #1d4ed8;
  font-weight: 500;
  font-size: 0.875rem;
}

.summary-list__empty-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

.summary-list__empty-link:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 2px;
}

.summary-list__empty-value {
  color: #a8a29e;
  font-style: italic;
}

@media (min-width: 640px) {
  .summary-list__row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0;
  }

  .summary-list__key {
    flex: 0 0 35%;
    font-size: 0.9375rem;
    margin-bottom: 0;
  }

  .summary-list__value {
    flex: 0 0 45%;
  }

  .summary-list__actions {
    flex: 0 0 20%;
    margin-top: 0;
    text-align: right;
    padding-left: 16px;
  }

  .summary-list__actions-list {
    justify-content: flex-end;
  }
}

.summary-card {
  background-color: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.summary-card__header {
  padding: 16px 20px;
  border-bottom: 1px solid #e7e5e4;
  background-color: #fafaf9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.summary-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #1c1917;
}

.summary-card__header-action {
  color: #1d4ed8;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 8px;
  margin-left: 8px;
  border-left: 1px solid #d6d3d1;
}

.summary-card__header-action:first-child {
  padding-left: 0;
  margin-left: 0;
  border-left: none;
}

.summary-card__header-action:hover {
  color: #1e40af;
  text-decoration: underline;
}

.summary-card__header-action:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 2px;
}

.summary-card__actions {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.summary-card__action {
  margin: 0;
  font-size: 0.875rem;
}

.summary-card__action a {
  color: #1d4ed8;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.summary-card__action a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.summary-card__action a:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 2px;
}

.summary-card__content {
  padding: 0;
}

.summary-card__content .summary-list__row {
  padding: 14px 20px;
}

@media (min-width: 640px) {
  .summary-card__header {
    padding: 20px 24px;
  }

  .summary-card__content .summary-list__row {
    padding: 16px 24px;
  }
}

.patient-profile-card {
  background-color: #ffffff;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.patient-profile-card__photo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.patient-profile-card__photo-wrapper {
  margin-bottom: 8px;
}

.patient-profile-card__photo {
  width: 160px;
  height: 160px;
  max-width: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.patient-profile-card__photo-placeholder {
  width: 160px;
  height: 160px;
  max-width: 100%;
  border-radius: 50%;
  background-color: #f5f5f4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.patient-profile-card__photo-placeholder-icon {
  width: 64px;
  height: 64px;
  color: #a8a29e;
}

.patient-profile-card__photo-action {
  background: none;
  border: none;
  font-size: 0.875rem;
  color: #78716c;
  cursor: pointer;
  padding: 4px 8px;
}

.patient-profile-card__photo-action:hover {
  color: #44403c;
  text-decoration: underline;
}

.patient-profile-card__photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.patient-profile-card__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.patient-profile-card__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.patient-profile-card__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1c1917;
  margin: 0;
}

.patient-profile-card__name-edit {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #a8a29e;
  display: flex;
  align-items: center;
  justify-content: center;
}

.patient-profile-card__name-edit:hover {
  color: #44403c;
}

.patient-profile-card__name-edit-icon {
  width: 16px;
  height: 16px;
}

.patient-profile-card__id {
  font-size: 1rem;
  color: #78716c;
  margin: 0;
}

.patient-profile-card__status {
  display: flex;
  align-items: center;
}

.patient-profile-card__status-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.patient-profile-card__status-button:hover {
  opacity: 0.8;
}

.patient-profile-card__status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 1.125rem;
  font-weight: 600;
  border: 1px solid;
}

.patient-profile-card__status-badge.critical {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.patient-profile-card__status-badge.stable {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.patient-profile-card__status-badge.recovering {
  background-color: #fefce8;
  color: #a16207;
  border-color: #fef08a;
}

.patient-profile-card__status-badge.ready_for_release {
  background-color: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.patient-profile-card__status-badge.released {
  background-color: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.patient-profile-card__status-badge.deceased {
  background-color: #fafaf9;
  color: #44403c;
  border-color: #e7e5e4;
}

.patient-profile-card__status-badge.discharged {
  background-color: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.modal-form__group {
  margin-bottom: 16px;
}

.modal-form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1c1917;
  margin-bottom: 4px;
}

.modal-form__file-input {
  display: block;
  width: 100%;
  font-size: 0.875rem;
  color: #78716c;
}

.modal-form__file-input::file-selector-button {
  margin-right: 16px;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #f5f5f4;
  color: #44403c;
  cursor: pointer;
}

.modal-form__file-input::file-selector-button:hover {
  background-color: #e7e5e4;
}

.modal-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid;
}

.btn--primary {
  background-color: #1c1917;
  color: #ffffff;
  border-color: #1c1917;
}

.btn--primary:hover {
  background-color: #292524;
}

.btn--secondary {
  background-color: #ffffff;
  color: #1c1917;
  border-color: #d6d3d1;
}

.btn--secondary:hover {
  background-color: #f5f5f4;
}

@media (min-width: 640px) {
  .patient-profile-card__photo {
    width: 192px;
    height: 192px;
  }

  .patient-profile-card__photo-placeholder {
    width: 192px;
    height: 192px;
  }
}


dialog[popover]::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
	display: block;
}

dialog[popover] {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: white !important;
  border: 1px solid var(--border);
  border-radius: 16px;
  min-width: min(600px, 95vw);
  width: max-content;
  height: fit-content;
  max-width: 95vw;
  max-height: 95vh;
}
